Compare commits

..

1 commit

Author SHA1 Message Date
Mark Anderson
727b5c9b65
chore: update xcode to 16.2 and to macos-latest 2025-04-11 12:53:08 -04:00
8 changed files with 29 additions and 56 deletions

View file

@ -15,30 +15,13 @@ on:
jobs: jobs:
build: build:
runs-on: macos-15 runs-on: macos-latest
timeout-minutes: 30 timeout-minutes: 30
steps: steps:
- name: Validate release version - run: sudo xcode-select --switch /Applications/Xcode_16.2.app
run: | - uses: actions/checkout@v4
version="${{ inputs.release-version }}"
major="${version%%.*}"
if [[ ! "$major" =~ ^[0-9]+$ ]] || (( major < 6 || major > 8 )); then
echo "::error::Capacitor $version is not supported by this repository. Starting with Capacitor 9 (see https://github.com/ionic-team/capacitor/pull/8588 PR), the iOS platform is a source-first Swift package built directly from the ionic-team/capacitor repository, so SPM distribution no longer happens here. This repository only releases major versions 6, 7, and 8."
exit 1
fi
- run: |
if [[ "${{ inputs.release-version }}" =~ ^[67]\. ]]; then
sudo xcode-select --switch /Applications/Xcode_16.2.app
else
sudo xcode-select --switch /Applications/Xcode_26.0.app
fi
- uses: actions/checkout@v7
- name: Install dependencies - name: Install dependencies
run: brew install ghr run: brew install ghr
- name: Check Simulators
run: xcrun simctl list > /dev/null
- name: Install Simulators
run: xcodebuild -downloadPlatform iOS
- name: Build Capacitor and Cordova - name: Build Capacitor and Cordova
run: ./build-cap ${{ inputs.release-version }} run: ./build-cap ${{ inputs.release-version }}
- name: Sign Capacitor xcframework - name: Sign Capacitor xcframework

2
.gitignore vendored
View file

@ -3,4 +3,4 @@ capacitor-checkout
*.zip *.zip
.swiftpm .swiftpm
frameworks frameworks
.build

View file

@ -1,4 +0,0 @@
Capacitor/Cordova 8.5.2, unchanged binary artifacts and upstream checksums.
Imported once from Ionic; future builds use only git.kico-dev.de.
Original upstream revision: 0b6882e9a3288342aacf36348e5a94e4f1dd7b13.
Licence and notices are retained from upstream. MeeNow pins this commit.

View file

@ -18,13 +18,13 @@ let package = Package(
targets: [ targets: [
.binaryTarget( .binaryTarget(
name: "Capacitor", name: "Capacitor",
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Capacitor.xcframework.zip", url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/6.2.1/Capacitor.xcframework.zip",
checksum: "134c65a8bd30bfaa8ccb158d78142fa7231bf3f472e4a5d808c5fbed90fd4c75" checksum: "dad7b961661855fecd45c38b1e317f64a046323cc05d204d054ada6d5b7f4378"
), ),
.binaryTarget( .binaryTarget(
name: "Cordova", name: "Cordova",
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Cordova.xcframework.zip", url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/6.2.1/Cordova.xcframework.zip",
checksum: "57ff2c8f1e5dcd8d4379ac3cccde1407d81ccd575347dc2aff4f72272b8794a1" checksum: "fb10239d76bf36787063e9a0c60219397c3648c781b8cd9e1a9e2a3990cbe5ce"
) )
] ]
) )

View file

@ -1,5 +1,3 @@
# Swift Package Manager Support for Capacitor # Experimental Swift Package Manager Support for Capacitor
This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for SPM support. This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for experimental SPM support.
Only applies to Capacitor major versions 6, 7, and 8. Starting with Capacitor 9, the iOS platform is a source-first Swift package built directly from the [ionic-team/capacitor](https://github.com/ionic-team/capacitor) repository.

Binary file not shown.

Binary file not shown.

View file

@ -1,25 +1,23 @@
#!/usr/bin/env bash -eoux pipefail #!/usr/bin/env bash -eoux pipefail
build_simulator() { build_capacitor_simulator() {
local SCHEME=$1
xcodebuild archive \ xcodebuild archive \
-scheme $SCHEME \ -scheme Capacitor \
-workspace Capacitor.xcworkspace \ -workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS Simulator" \ -destination "generic/platform=iOS Simulator" \
-configuration Debug \ -configuration Debug \
-archivePath ./Build/$SCHEME-iOS-Simulator \ -archivePath ./Build/iOS-Simulator \
SKIP_INSTALL=NO \ SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \ BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" DEBUG_INFORMATION_FORMAT="dwarf-with-dsym"
} }
build_ios() { build_capacitor_ios() {
local SCHEME=$1
xcodebuild archive \ xcodebuild archive \
-scheme $SCHEME \ -scheme Capacitor \
-workspace Capacitor.xcworkspace \ -workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS" \ -destination "generic/platform=iOS" \
-archivePath ./Build/$SCHEME-iOS \ -archivePath ./Build/iOS \
SKIP_INSTALL=NO \ SKIP_INSTALL=NO \
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \ SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \ DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \
@ -27,28 +25,26 @@ build_ios() {
} }
create_xcframeworks() { create_xcframeworks() {
build_simulator Capacitor build_capacitor_simulator
build_simulator Cordova build_capacitor_ios
build_ios Capacitor rm -rf ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
build_ios Cordova rm -rf ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
rm -rf ./Build/Capacitor-iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
rm -rf ./Build/Capacitor-iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
xcodebuild -create-xcframework \ xcodebuild -create-xcframework \
-framework ./Build/Capacitor-iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \ -framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-debug-symbols $PWD/Build/Capacitor-iOS-Simulator.xcarchive/dSYMs/Capacitor.framework.dSYM \ -debug-symbols $PWD/Build/iOS-Simulator.xcarchive/dSYMs/Capacitor.framework.dSYM \
-framework ./Build/Capacitor-iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \ -framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-debug-symbols $PWD/Build/Capacitor-iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \ -debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
-output Capacitor.xcframework -output Capacitor.xcframework
xcodebuild -create-xcframework \ xcodebuild -create-xcframework \
-framework ./Build/Cordova-iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \ -framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
-debug-symbols $PWD/Build/Cordova-iOS-Simulator.xcarchive/dSYMs/Cordova.framework.dSYM \ -debug-symbols $PWD/Build/iOS-Simulator.xcarchive/dSYMs/Cordova.framework.dSYM \
-framework ./Build/Cordova-iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \ -framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
-debug-symbols $PWD/Build/Cordova-iOS.xcarchive/dSYMs/Cordova.framework.dSYM \ -debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
-output Cordova.xcframework -output Cordova.xcframework
} }
git clone https://github.com/ionic-team/capacitor capacitor-checkout git clone https://github.com/ionic-team/capacitor capacitor-checkout