Fix building issue
This commit is contained in:
parent
2e951497ad
commit
90f1f54a21
8 changed files with 158 additions and 86 deletions
2
Cartfile
2
Cartfile
|
|
@ -1 +1 @@
|
||||||
github "SVProgressHUD/SVProgressHUD"
|
github "SVProgressHUD/SVProgressHUD" "master"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
github "SVProgressHUD/SVProgressHUD" "2.2.5"
|
github "SVProgressHUD/SVProgressHUD" "de1d4dba816a19454329031156b8788692bcfa2c"
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ For more, please read the [wiki page](https://github.com/mssun/passforios/wiki).
|
||||||
## Building Pass for iOS
|
## Building Pass for iOS
|
||||||
|
|
||||||
1. Install Carthage, Go, SwiftLint, and SwiftFormat: `brew install carthage go swiftlint swiftformat`.
|
1. Install Carthage, Go, SwiftLint, and SwiftFormat: `brew install carthage go swiftlint swiftformat`.
|
||||||
2. Install dependencies via Carthage. Therefore, execute `carthage update` and `carthage bootstrap --platform iOS --use-xcframeworks` in the root directory of the project.
|
2. Install dependencies via Carthage. Therefore, execute `carthage bootstrap --platform iOS --use-xcframeworks` in the root directory of the project.
|
||||||
3. Run `./scripts/gopenpgp_build.sh` to build GopenPGP.
|
3. Run `./scripts/gopenpgp_build.sh` to build GopenPGP.
|
||||||
5. Open the `pass.xcodeproj` file in Xcode.
|
5. Open the `pass.xcodeproj` file in Xcode.
|
||||||
6. Build & Run.
|
6. Build & Run.
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ platform :ios do
|
||||||
scheme: "pass",
|
scheme: "pass",
|
||||||
configuration: "Beta",
|
configuration: "Beta",
|
||||||
skip_profile_detection: true,
|
skip_profile_detection: true,
|
||||||
|
export_method: "app-store",
|
||||||
export_options: {
|
export_options: {
|
||||||
method: "app-store",
|
method: "app-store",
|
||||||
provisioningProfiles: {
|
provisioningProfiles: {
|
||||||
|
|
|
||||||
|
|
@ -1116,9 +1116,9 @@
|
||||||
isa = PBXNativeTarget;
|
isa = PBXNativeTarget;
|
||||||
buildConfigurationList = A260758F1EEC6F34005DB03E /* Build configuration list for PBXNativeTarget "passKit" */;
|
buildConfigurationList = A260758F1EEC6F34005DB03E /* Build configuration list for PBXNativeTarget "passKit" */;
|
||||||
buildPhases = (
|
buildPhases = (
|
||||||
|
A26075751EEC6F34005DB03E /* Headers */,
|
||||||
A26075731EEC6F34005DB03E /* Sources */,
|
A26075731EEC6F34005DB03E /* Sources */,
|
||||||
A26075741EEC6F34005DB03E /* Frameworks */,
|
A26075741EEC6F34005DB03E /* Frameworks */,
|
||||||
A26075751EEC6F34005DB03E /* Headers */,
|
|
||||||
A26075761EEC6F34005DB03E /* Resources */,
|
A26075761EEC6F34005DB03E /* Resources */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
|
|
@ -2811,7 +2811,7 @@
|
||||||
repositoryURL = "https://github.com/krzyzanowskim/ObjectivePGP";
|
repositoryURL = "https://github.com/krzyzanowskim/ObjectivePGP";
|
||||||
requirement = {
|
requirement = {
|
||||||
kind = upToNextMajorVersion;
|
kind = upToNextMajorVersion;
|
||||||
minimumVersion = 0.99.0;
|
minimumVersion = 0.99.2;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
30A3000C26DA62F4002A734E /* XCRemoteSwiftPackageReference "Base32" */ = {
|
30A3000C26DA62F4002A734E /* XCRemoteSwiftPackageReference "Base32" */ = {
|
||||||
|
|
|
||||||
|
|
@ -1,79 +1,76 @@
|
||||||
{
|
{
|
||||||
"object": {
|
"pins" : [
|
||||||
"pins": [
|
{
|
||||||
{
|
"identity" : "base32",
|
||||||
"package": "Base32",
|
"kind" : "remoteSourceControl",
|
||||||
"repositoryURL": "https://github.com/mattrubin/Base32",
|
"location" : "https://github.com/mattrubin/Base32",
|
||||||
"state": {
|
"state" : {
|
||||||
"branch": "1.1.2+spm",
|
"branch" : "1.1.2+spm",
|
||||||
"revision": "d185e44c8b355d34d5c6c6ad502c60cba4599f69",
|
"revision" : "d185e44c8b355d34d5c6c6ad502c60cba4599f69"
|
||||||
"version": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "FavIcon",
|
|
||||||
"repositoryURL": "https://github.com/leonbreedt/FavIcon",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "5bf16aad3ea543891eaef7e8da2aa2f6bb29e6e4",
|
|
||||||
"version": "3.1.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "KeychainAccess",
|
|
||||||
"repositoryURL": "https://github.com/kishikawakatsumi/KeychainAccess",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "84e546727d66f1adc5439debad16270d0fdd04e7",
|
|
||||||
"version": "4.2.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "ObjectiveGit",
|
|
||||||
"repositoryURL": "https://github.com/SimplyDanny/objective-git-swift-package",
|
|
||||||
"state": {
|
|
||||||
"branch": "0.17-passforios",
|
|
||||||
"revision": "553f09c836b4f90e447e0fe26633acc11c37cece",
|
|
||||||
"version": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "ObjectivePGP",
|
|
||||||
"repositoryURL": "https://github.com/krzyzanowskim/ObjectivePGP",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "0dc7ca7ffe193095dc37456b0c75be167a2026f4",
|
|
||||||
"version": "0.99.2"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "OneTimePassword",
|
|
||||||
"repositoryURL": "https://github.com/mssun/OneTimePassword",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "8d59e4abba762d0f1e9aed161081f7b3fe21daa0",
|
|
||||||
"version": null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "SwiftyUserDefaults",
|
|
||||||
"repositoryURL": "https://github.com/sunshinejr/SwiftyUserDefaults",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "f66bcd04088582c8fbb5cb8554d577e303bae396",
|
|
||||||
"version": "5.3.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"package": "YubiKit",
|
|
||||||
"repositoryURL": "https://github.com/Yubico/yubikit-ios",
|
|
||||||
"state": {
|
|
||||||
"branch": null,
|
|
||||||
"revision": "7e75fe8f057acf9bf7ac134d375783a1d409f79e",
|
|
||||||
"version": "4.1.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
},
|
||||||
},
|
{
|
||||||
"version": 1
|
"identity" : "favicon",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/leonbreedt/FavIcon",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "5bf16aad3ea543891eaef7e8da2aa2f6bb29e6e4",
|
||||||
|
"version" : "3.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "keychainaccess",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/kishikawakatsumi/KeychainAccess",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "84e546727d66f1adc5439debad16270d0fdd04e7",
|
||||||
|
"version" : "4.2.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "objective-git-swift-package",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/SimplyDanny/objective-git-swift-package",
|
||||||
|
"state" : {
|
||||||
|
"branch" : "0.17-passforios",
|
||||||
|
"revision" : "553f09c836b4f90e447e0fe26633acc11c37cece"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "objectivepgp",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/krzyzanowskim/ObjectivePGP",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "0dc7ca7ffe193095dc37456b0c75be167a2026f4",
|
||||||
|
"version" : "0.99.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "onetimepassword",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/mssun/OneTimePassword",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "8d59e4abba762d0f1e9aed161081f7b3fe21daa0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "swiftyuserdefaults",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/sunshinejr/SwiftyUserDefaults",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "f66bcd04088582c8fbb5cb8554d577e303bae396",
|
||||||
|
"version" : "5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"identity" : "yubikit-ios",
|
||||||
|
"kind" : "remoteSourceControl",
|
||||||
|
"location" : "https://github.com/Yubico/yubikit-ios",
|
||||||
|
"state" : {
|
||||||
|
"revision" : "7b19be11a362d9e52eac0d76b5d904560b9e5ea7",
|
||||||
|
"version" : "4.2.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version" : 2
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,74 @@
|
||||||
import Foundation
|
import Foundation
|
||||||
import SwiftyUserDefaults
|
import SwiftyUserDefaults
|
||||||
|
|
||||||
|
// Workaround for Xcode 13: https://github.com/sunshinejr/SwiftyUserDefaults/issues/285
|
||||||
|
|
||||||
|
extension DefaultsSerializable {
|
||||||
|
public static var _defaultsArray: DefaultsArrayBridge<[T]> { return DefaultsArrayBridge() }
|
||||||
|
}
|
||||||
|
extension Date: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsObjectBridge<Date> { return DefaultsObjectBridge() }
|
||||||
|
}
|
||||||
|
extension String: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsStringBridge { return DefaultsStringBridge() }
|
||||||
|
}
|
||||||
|
extension Int: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsIntBridge { return DefaultsIntBridge() }
|
||||||
|
}
|
||||||
|
extension Double: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsDoubleBridge { return DefaultsDoubleBridge() }
|
||||||
|
}
|
||||||
|
extension Bool: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsBoolBridge { return DefaultsBoolBridge() }
|
||||||
|
}
|
||||||
|
extension Data: DefaultsSerializable {
|
||||||
|
public static var _defaults: DefaultsDataBridge { return DefaultsDataBridge() }
|
||||||
|
}
|
||||||
|
|
||||||
|
extension URL: DefaultsSerializable {
|
||||||
|
#if os(Linux)
|
||||||
|
public static var _defaults: DefaultsKeyedArchiverBridge<URL> { return DefaultsKeyedArchiverBridge() }
|
||||||
|
#else
|
||||||
|
public static var _defaults: DefaultsUrlBridge { return DefaultsUrlBridge() }
|
||||||
|
#endif
|
||||||
|
public static var _defaultsArray: DefaultsKeyedArchiverBridge<[URL]> { return DefaultsKeyedArchiverBridge() }
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DefaultsSerializable where Self: Codable {
|
||||||
|
public static var _defaults: DefaultsCodableBridge<Self> { return DefaultsCodableBridge() }
|
||||||
|
public static var _defaultsArray: DefaultsCodableBridge<[Self]> { return DefaultsCodableBridge() }
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DefaultsSerializable where Self: RawRepresentable {
|
||||||
|
public static var _defaults: DefaultsRawRepresentableBridge<Self> { return DefaultsRawRepresentableBridge() }
|
||||||
|
public static var _defaultsArray: DefaultsRawRepresentableArrayBridge<[Self]> { return DefaultsRawRepresentableArrayBridge() }
|
||||||
|
}
|
||||||
|
|
||||||
|
extension DefaultsSerializable where Self: NSCoding {
|
||||||
|
public static var _defaults: DefaultsKeyedArchiverBridge<Self> { return DefaultsKeyedArchiverBridge() }
|
||||||
|
public static var _defaultsArray: DefaultsKeyedArchiverBridge<[Self]> { return DefaultsKeyedArchiverBridge() }
|
||||||
|
}
|
||||||
|
|
||||||
|
extension Dictionary: DefaultsSerializable where Key == String {
|
||||||
|
public typealias T = [Key: Value]
|
||||||
|
public typealias Bridge = DefaultsObjectBridge<T>
|
||||||
|
public typealias ArrayBridge = DefaultsArrayBridge<[T]>
|
||||||
|
public static var _defaults: Bridge { return Bridge() }
|
||||||
|
public static var _defaultsArray: ArrayBridge { return ArrayBridge() }
|
||||||
|
}
|
||||||
|
extension Array: DefaultsSerializable where Element: DefaultsSerializable {
|
||||||
|
public typealias T = [Element.T]
|
||||||
|
public typealias Bridge = Element.ArrayBridge
|
||||||
|
public typealias ArrayBridge = DefaultsObjectBridge<[T]>
|
||||||
|
public static var _defaults: Bridge {
|
||||||
|
return Element._defaultsArray
|
||||||
|
}
|
||||||
|
public static var _defaultsArray: ArrayBridge {
|
||||||
|
fatalError("Multidimensional arrays are not supported yet")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public var Defaults = DefaultsAdapter(defaults: UserDefaults(suiteName: Globals.groupIdentifier)!, keyStore: DefaultsKeys())
|
public var Defaults = DefaultsAdapter(defaults: UserDefaults(suiteName: Globals.groupIdentifier)!, keyStore: DefaultsKeys())
|
||||||
|
|
||||||
public enum KeySource: String, DefaultsSerializable {
|
public enum KeySource: String, DefaultsSerializable {
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,21 @@ GOPENPGP_PATH="$CHECKOUT_PATH/gopenpgp"
|
||||||
mkdir -p "$OUTPUT_PATH"
|
mkdir -p "$OUTPUT_PATH"
|
||||||
mkdir -p "$CHECKOUT_PATH"
|
mkdir -p "$CHECKOUT_PATH"
|
||||||
|
|
||||||
go env -w GO111MODULE=auto
|
go install golang.org/x/mobile/cmd/gomobile@latest
|
||||||
go get golang.org/x/mobile/cmd/gomobile
|
|
||||||
gomobile init
|
gomobile init
|
||||||
|
|
||||||
git clone --depth 1 --branch "$GOPENPGP_VERSION" https://github.com/mssun/gopenpgp.git "$GOPENPGP_PATH"
|
git clone --depth 1 --branch "$GOPENPGP_VERSION" https://github.com/mssun/gopenpgp.git "$GOPENPGP_PATH"
|
||||||
|
|
||||||
sed -i '' 's/build android/echo "Skipping Android build."/g' "$GOPENPGP_PATH/build.sh"
|
pushd "$GOPENPGP_PATH"
|
||||||
|
mkdir -p dist
|
||||||
(cd "$GOPENPGP_PATH" && ./build.sh)
|
go mod download github.com/ProtonMail/go-crypto
|
||||||
|
gomobile bind -tags mobile -target ios -iosversion 12.0 -v -x -ldflags="-s -w" -o dist/Gopenpgp.xcframework \
|
||||||
|
github.com/ProtonMail/gopenpgp/v2/crypto \
|
||||||
|
github.com/ProtonMail/gopenpgp/v2/armor \
|
||||||
|
github.com/ProtonMail/gopenpgp/v2/constants \
|
||||||
|
github.com/ProtonMail/gopenpgp/v2/models \
|
||||||
|
github.com/ProtonMail/gopenpgp/v2/subtle github.com/ProtonMail/gopenpgp/v2/helper
|
||||||
|
popd
|
||||||
|
|
||||||
cp -r "$GOPENPGP_PATH/dist/Gopenpgp.xcframework" "$OUTPUT_PATH"
|
cp -r "$GOPENPGP_PATH/dist/Gopenpgp.xcframework" "$OUTPUT_PATH"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue