fix: Add workaround for embedded Cordova in Capacitor.framework

feat: Update to Capacitor 3.6.0
This commit is contained in:
Steven Sherry 2022-06-21 11:59:23 -05:00
parent 2289171f18
commit 327984e52e
No known key found for this signature in database
GPG key ID: 6C07B855139186A2
2 changed files with 10 additions and 8 deletions

View file

@ -18,13 +18,13 @@ let package = Package(
targets: [ targets: [
.binaryTarget( .binaryTarget(
name: "Capacitor", name: "Capacitor",
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.5.1/Capacitor.xcframework.zip", url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.6.0/Capacitor.xcframework.zip",
checksum: "cc5d74b531ca40ba6ed4deca3bd5bb20aa3727684d8965ae94b9f075a19f4a37" checksum: "9ce71c655abfbed8996fab268138276cff6f5e6d52a617813d860a706c041788"
), ),
.binaryTarget( .binaryTarget(
name: "Cordova", name: "Cordova",
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.5.1/CapacitorCordova.xcframework.zip", url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.6.0/CapacitorCordova.xcframework.zip",
checksum: "85f0a7a523f073cc55af7e02c8e4b9322e2681fe012813a32015e9304e5ee1c1" checksum: "deb7c4bdae053163061305daa6d78abb91ebdfef456136719aa97dd941de7470"
) )
] ]
) )

View file

@ -4,7 +4,6 @@ portals_dev_release_commit() {
git log --oneline | grep -B 1 "Release $1" | head -n1 | sed 's/ /\n/g' | head -n1 | xargs git checkout git log --oneline | grep -B 1 "Release $1" | head -n1 | sed 's/ /\n/g' | head -n1 | xargs git checkout
} }
build_capacitor_simulator() { build_capacitor_simulator() {
xcodebuild archive \ xcodebuild archive \
-scheme Capacitor \ -scheme Capacitor \
@ -29,6 +28,9 @@ create_xcframeworks() {
build_capacitor_simulator build_capacitor_simulator
build_capacitor_ios build_capacitor_ios
rm -rf ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
rm -rf ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
xcodebuild -create-xcframework \ xcodebuild -create-xcframework \
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \ -framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \ -framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
@ -81,14 +83,14 @@ EOF
git clone https://github.com/ionic-team/capacitor capacitor-checkout git clone https://github.com/ionic-team/capacitor capacitor-checkout
cd capacitor-checkout/ios/Capacitor cd capacitor-checkout/ios/Capacitor
git checkout portals-dev git checkout portals-dev
#portals_dev_release_commit $1 portals_dev_release_commit $1
create_xcframeworks create_xcframeworks
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip" cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
cap_sha=$(sha256sum Capacitor.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n) cap_sha=$(shasum -a 256 Capacitor.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
cap_cordova_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/CapacitorCordova.xcframework.zip" cap_cordova_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/CapacitorCordova.xcframework.zip"
cap_cordova_sha=$(sha256sum Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n) cap_cordova_sha=$(shasum -a 256 Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
cd ../../../ cd ../../../