From 3b8ab2a03f588321ac53827a77b01b537298141b Mon Sep 17 00:00:00 2001 From: Thomas Vidas Date: Thu, 4 Nov 2021 16:22:52 -0400 Subject: [PATCH] feat: Support Carthage XCFrameworks (#88) * test: carthage download test * feat(ios): create simple build script for building xcframework with carthage * feat: update .gitignore to ignore Carthage build artifacts, update verify script * fix(android): readme and to incr. version * chore: cap 3.2.5 doc updates * chore(android): updated Capacitor Dependency version to 3.2.5 * Release 0.2.2 * refactor: move cartfile to root to pull in cap dependency Co-authored-by: Carl Poole --- .gitignore | 4 + Cartfile | 1 + Cartfile.resolved | 1 + carthage.sh | 3 + .../IonicPortals.xcodeproj/project.pbxproj | 8 +- .../xcschemes/IonicPortals.xcscheme | 77 ++++++++++++++++++ .../xcschemes/PortalsTestApp (iOS).xcscheme | 78 +++++++++++++++++++ ios/package.json | 3 +- 8 files changed, 172 insertions(+), 3 deletions(-) create mode 100644 Cartfile create mode 100644 Cartfile.resolved create mode 100644 carthage.sh create mode 100644 ios/IonicPortals/IonicPortals.xcodeproj/xcshareddata/xcschemes/IonicPortals.xcscheme create mode 100644 ios/PortalsTestApp/PortalsTestApp.xcodeproj/xcshareddata/xcschemes/PortalsTestApp (iOS).xcscheme diff --git a/.gitignore b/.gitignore index 9e66c4ec..b6d3c787 100644 --- a/.gitignore +++ b/.gitignore @@ -193,3 +193,7 @@ iOSInjectionProject/ # ========== node_modules plugin/dist + +# Carthage +Carthage +IonicPortals.xcframework.zip diff --git a/Cartfile b/Cartfile new file mode 100644 index 00000000..91b8122b --- /dev/null +++ b/Cartfile @@ -0,0 +1 @@ +github "ionic-team/capacitor" == 3.2.5 diff --git a/Cartfile.resolved b/Cartfile.resolved new file mode 100644 index 00000000..19eca0b2 --- /dev/null +++ b/Cartfile.resolved @@ -0,0 +1 @@ +github "ionic-team/capacitor" "3.2.5" diff --git a/carthage.sh b/carthage.sh new file mode 100644 index 00000000..c3daaa56 --- /dev/null +++ b/carthage.sh @@ -0,0 +1,3 @@ +carthage update --use-xcframeworks +carthage build --no-skip-current --use-xcframeworks +zip -r IonicPortals.xcframework.zip Carthage diff --git a/ios/IonicPortals/IonicPortals.xcodeproj/project.pbxproj b/ios/IonicPortals/IonicPortals.xcodeproj/project.pbxproj index b03b927f..0d9a362d 100644 --- a/ios/IonicPortals/IonicPortals.xcodeproj/project.pbxproj +++ b/ios/IonicPortals/IonicPortals.xcodeproj/project.pbxproj @@ -308,6 +308,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -372,6 +373,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -448,7 +450,7 @@ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.IonicPortals; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SUPPORTS_MACCATALYST = NO; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -478,7 +480,7 @@ PRODUCT_BUNDLE_IDENTIFIER = io.ionic.IonicPortals; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; PROVISIONING_PROFILE_SPECIFIER = ""; - SKIP_INSTALL = YES; + SKIP_INSTALL = NO; SUPPORTS_MACCATALYST = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -499,6 +501,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = io.ionic.IonicPortalsTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -518,6 +521,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = io.ionic.IonicPortalsTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/ios/IonicPortals/IonicPortals.xcodeproj/xcshareddata/xcschemes/IonicPortals.xcscheme b/ios/IonicPortals/IonicPortals.xcodeproj/xcshareddata/xcschemes/IonicPortals.xcscheme new file mode 100644 index 00000000..47dc9ba0 --- /dev/null +++ b/ios/IonicPortals/IonicPortals.xcodeproj/xcshareddata/xcschemes/IonicPortals.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/PortalsTestApp/PortalsTestApp.xcodeproj/xcshareddata/xcschemes/PortalsTestApp (iOS).xcscheme b/ios/PortalsTestApp/PortalsTestApp.xcodeproj/xcshareddata/xcschemes/PortalsTestApp (iOS).xcscheme new file mode 100644 index 00000000..5f2f0931 --- /dev/null +++ b/ios/PortalsTestApp/PortalsTestApp.xcodeproj/xcshareddata/xcschemes/PortalsTestApp (iOS).xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/package.json b/ios/package.json index 50681282..ce5eb757 100644 --- a/ios/package.json +++ b/ios/package.json @@ -14,7 +14,8 @@ }, "files": [], "scripts": { - "verify": "xcodebuild -workspace IonicPortals.xcworkspace -scheme IonicPortals" + "verify": "xcodebuild -workspace IonicPortals.xcworkspace -scheme IonicPortals -destination generic/platform=iOS", + "carthage": "sh carthage.sh" }, "private": true }