Compare commits

...

104 commits

Author SHA1 Message Date
Codex AI
2ea8038700 chore: resolve binary artifacts from Forgejo 2026-10-12 14:27:47 +02:00
Codex AI
916218efd5 chore: vendor verified Capacitor 8.5.2 binary artifacts 2026-10-12 14:27:47 +02:00
jcesarmobile
0b6882e9a3 Commit from GitHub Actions (Dispatch Release) 2026-09-11 15:05:16 +00:00
Pedro Bilro
20fe7c6b59
chore: block releases for Capacitor 9 (#41) 2026-09-10 16:52:37 +01:00
ItsChaceD
fd80ee6f10 Commit from GitHub Actions (Dispatch Release) 2026-08-31 22:27:38 +00:00
jcesarmobile
ac5dacb8f1 Commit from GitHub Actions (Dispatch Release) 2026-08-31 22:09:30 +00:00
jcesarmobile
89e0d8ec23 Commit from GitHub Actions (Dispatch Release) 2026-08-31 22:01:49 +00:00
jcesarmobile
6afa7424fd Commit from GitHub Actions (Dispatch Release) 2026-08-31 21:57:16 +00:00
Chace Daniels
e475cc64d9
ci: build 6.x releases with Xcode 16.2 2026-08-31 16:39:35 -05:00
jcesarmobile
4f71d0b979 Commit from GitHub Actions (Dispatch Release) 2026-07-31 15:49:11 +00:00
markemer
41ee0b4d86 Commit from GitHub Actions (Dispatch Release) 2026-07-16 20:12:25 +00:00
Pedro Bilro
f8a4de3e3d
ci: use different MacOS runners for different majors (#39) 2026-07-16 16:02:06 -04:00
markemer
d72bb9e9e4 Commit from GitHub Actions (Dispatch Release) 2026-07-14 18:11:44 +00:00
markemer
9b9fb0af76 Commit from GitHub Actions (Dispatch Release) 2026-07-14 17:53:51 +00:00
Mark Anderson
2334e37813
fix: ugrade checkout action to v7 and add simulator checks (#38) 2026-07-14 13:47:23 -04:00
Mark Anderson
a60b90c91a
chore: update scheme based optional cordova builds (#37)
Signed-off-by: Mark Anderson <mark.anderson@outsystems.com>
2026-07-09 12:57:03 -04:00
jcesarmobile
851c9bf29e Commit from GitHub Actions (Dispatch Release) 2026-06-23 16:01:40 +00:00
jcesarmobile
2231987d85 Commit from GitHub Actions (Dispatch Release) 2026-06-19 09:03:41 +00:00
jcesarmobile
d6c8e23b6f Commit from GitHub Actions (Dispatch Release) 2026-06-19 08:48:33 +00:00
jcesarmobile
eb8e80d3dd Commit from GitHub Actions (Dispatch Release) 2026-06-19 08:44:50 +00:00
jcesarmobile
8cf9fd3d1a Commit from GitHub Actions (Dispatch Release) 2026-06-02 16:28:06 +00:00
jcesarmobile
40cf264baa Commit from GitHub Actions (Dispatch Release) 2026-06-02 16:11:24 +00:00
jcesarmobile
44ae2505f5 Commit from GitHub Actions (Dispatch Release) 2026-06-02 15:57:34 +00:00
jcesarmobile
2ef806c38f Commit from GitHub Actions (Dispatch Release) 2026-05-12 21:12:08 +00:00
jcesarmobile
aa5713389a Commit from GitHub Actions (Dispatch Release) 2026-05-12 20:51:32 +00:00
jcesarmobile
992959f046 Commit from GitHub Actions (Dispatch Release) 2026-05-12 20:40:47 +00:00
jcesarmobile
13a67f0c53 Commit from GitHub Actions (Dispatch Release) 2026-05-08 17:23:13 +00:00
jcesarmobile
3ead36c2c7 Commit from GitHub Actions (Dispatch Release) 2026-05-08 17:18:41 +00:00
jcesarmobile
1af38be000 Commit from GitHub Actions (Dispatch Release) 2026-05-08 17:10:27 +00:00
jcesarmobile
9c86f58fd1 Commit from GitHub Actions (Dispatch Release) 2026-05-07 17:17:58 +00:00
jcesarmobile
fd9be5cc06 Commit from GitHub Actions (Dispatch Release) 2026-05-07 16:59:50 +00:00
jcesarmobile
ba301d2c37 Commit from GitHub Actions (Dispatch Release) 2026-05-07 16:57:11 +00:00
jcesarmobile
f1a8fadf14 Commit from GitHub Actions (Dispatch Release) 2026-04-16 14:59:01 +00:00
jcesarmobile
47ef02b780 Commit from GitHub Actions (Dispatch Release) 2026-04-16 14:45:30 +00:00
jcesarmobile
6a2a3feb25 Commit from GitHub Actions (Dispatch Release) 2026-03-25 17:05:28 +00:00
jcesarmobile
2a8cdc9b1b Commit from GitHub Actions (Dispatch Release) 2026-03-25 16:37:04 +00:00
jcesarmobile
de1d86e8b7 Commit from GitHub Actions (Dispatch Release) 2026-03-06 09:40:02 +00:00
jcesarmobile
0e862e6ff1 Commit from GitHub Actions (Dispatch Release) 2026-03-06 09:27:58 +00:00
jcesarmobile
1f324fe7bd Commit from GitHub Actions (Dispatch Release) 2026-02-11 18:45:29 +00:00
jcesarmobile
abbe338789 Commit from GitHub Actions (Dispatch Release) 2026-02-11 18:30:09 +00:00
Pedro Bilro
018d204bf2
ci: select xcode version based on release-version (#35) 2026-01-30 09:03:09 -05:00
jcesarmobile
13a39179b3 Commit from GitHub Actions (Dispatch Release) 2026-01-27 17:30:36 +00:00
Terence Honles
d79a663cf0
docs(README): remove "experimental" from heading (#34) 2026-01-23 12:07:18 -05:00
jcesarmobile
3e7ccfb8ab Commit from GitHub Actions (Dispatch Release) 2026-01-13 11:58:25 +00:00
jcesarmobile
1a85654262 Commit from GitHub Actions (Dispatch Release) 2026-01-13 11:54:23 +00:00
jcesarmobile
596259033e Commit from GitHub Actions (Dispatch Release) 2025-12-08 18:06:10 +00:00
jcesarmobile
a032c7cfbe
chore: use Xcode_26.0 to build (#31) 2025-12-02 14:54:21 +01:00
jcesarmobile
2249d05bb1
docs(README): it's not experimental (#30) 2025-12-02 14:43:58 +01:00
jcesarmobile
074b215a14 Commit from GitHub Actions (Dispatch Release) 2025-11-14 16:49:05 +00:00
jcesarmobile
145cf37b8e Commit from GitHub Actions (Dispatch Release) 2025-10-22 11:13:11 +00:00
jcesarmobile
414c01a66d Commit from GitHub Actions (Dispatch Release) 2025-10-22 10:57:37 +00:00
jcesarmobile
eb9a900023 Commit from GitHub Actions (Dispatch Release) 2025-08-26 17:12:47 +00:00
markemer
c01d70b994 Commit from GitHub Actions (Dispatch Release) 2025-08-20 14:40:52 +00:00
markemer
3fdb4ac03e Commit from GitHub Actions (Dispatch Release) 2025-07-10 15:18:41 +00:00
markemer
6231860a06 Commit from GitHub Actions (Dispatch Release) 2025-07-03 16:32:30 +00:00
markemer
3fae15b62e Commit from GitHub Actions (Dispatch Release) 2025-06-18 15:42:55 +00:00
markemer
2cded5ffb2 Commit from GitHub Actions (Dispatch Release) 2025-06-05 15:37:18 +00:00
markemer
7536a69ec7 Commit from GitHub Actions (Dispatch Release) 2025-04-14 15:56:45 +00:00
markemer
78e03547be Commit from GitHub Actions (Dispatch Release) 2025-04-11 16:56:55 +00:00
Mark Anderson
5c8b9c5b05
chore: update xcode to 16.2 and to macos-latest (#25) 2025-04-11 12:54:07 -04:00
Joey Pender
47b8c9a480
build simulator with debug configuration (#24) 2025-04-11 12:48:18 -04:00
vmfo22
3fe94bbbe4 Commit from GitHub Actions (Dispatch Release) 2025-03-31 17:00:43 +00:00
vmfo22
43fd229a6c Commit from GitHub Actions (Dispatch Release) 2025-03-31 16:57:28 +00:00
vmfo22
10bb4f254a Commit from GitHub Actions (Dispatch Release) 2025-03-12 16:33:08 +00:00
vmfo22
bc99a4197e Commit from GitHub Actions (Dispatch Release) 2025-01-21 15:06:06 +00:00
vmfo22
ef3cfccd70 Commit from GitHub Actions (Dispatch Release) 2025-01-20 16:25:23 +00:00
vmfo22
cae2886228 Commit from GitHub Actions (Dispatch Release) 2025-01-20 16:20:29 +00:00
vmfo22
f880c909a8 Commit from GitHub Actions (Dispatch Release) 2024-12-20 17:11:45 +00:00
vmfo22
fa7be66023 Commit from GitHub Actions (Dispatch Release) 2024-12-20 15:21:06 +00:00
vmfo22
2827600e5d Commit from GitHub Actions (Dispatch Release) 2024-11-19 17:19:53 +00:00
vmfo22
319dd95fba Commit from GitHub Actions (Dispatch Release) 2024-11-19 17:07:23 +00:00
vmfo22
cc2434d9cb Commit from GitHub Actions (Dispatch Release) 2024-10-14 08:41:30 +00:00
vmfo22
272e5dcd26 Commit from GitHub Actions (Dispatch Release) 2024-08-07 17:19:29 +00:00
vmfo22
09efee937d Commit from GitHub Actions (Dispatch Release) 2024-07-17 17:49:21 +00:00
vmfo22
8f7e7c53fe Commit from GitHub Actions (Dispatch Release) 2024-06-11 16:57:09 +00:00
giralte-ionic
8a46dff3a8 Commit from GitHub Actions (Dispatch Release) 2024-04-15 16:28:32 +00:00
Steven0351
ffc6cf0c3f Commit from GitHub Actions (Dispatch Release) 2024-04-12 19:41:11 +00:00
Steven Sherry
a76f23d65a
Update pre-release.yml 2024-04-12 14:39:17 -05:00
Steven Sherry
616308270a
Update build-and-release.yaml 2024-04-12 14:38:57 -05:00
Steven Sherry
4de67a38a7
Update dispatch-release.yaml 2024-04-12 14:37:39 -05:00
Steven0351
b8135b712f Commit from GitHub Actions (Dispatch Release) 2024-04-12 19:34:17 +00:00
Steven Sherry
bab28ba705
Update dispatch-release.yaml 2024-04-12 14:32:28 -05:00
Steven0351
e129bbd6fb Commit from GitHub Actions (Dispatch Release) 2024-04-12 19:31:45 +00:00
Steven Sherry
aba31a662d
Update dispatch-release.yaml 2024-04-12 14:26:44 -05:00
Steven0351
0f5be86433 Commit from GitHub Actions (Dispatch Release) 2024-04-12 19:23:37 +00:00
Steven0351
e4163c0867 Commit from GitHub Actions (Dispatch Release) 2024-04-12 19:20:10 +00:00
Steven Sherry
b0daa517a4
Release 6.0.0-rc.1 (#23)
* chore: Separate original workflow to make build and release logic reusable for different triggers
---------

Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2024-04-12 12:34:34 -05:00
Steven Sherry
f304c9dd18
Release 5.7.4 (#22)
* chore: Add xcframework signing for Capacitor and Cordova
2024-04-02 15:57:47 -05:00
Steven Sherry
fe3c5b63e7
Release 6.0.0 rc.0 (#21) 2024-02-12 16:32:20 -06:00
Steven Sherry
2ac2ed82d3
Release 5.5.0 (#20)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2023-10-20 11:19:25 -05:00
Steven Sherry
8acde9a484
Release 5.4.0 (#18) 2023-09-15 10:16:40 -05:00
Steven Sherry
d58ddfd0e7
Release 5.3.0 2023-09-14 13:19:40 -05:00
Steven Sherry
07ef99c868
Release 5.2.1 2023-09-14 09:38:15 -05:00
Steven Sherry
636ac32f18
Release 5.1.1 (#15)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2023-07-13 11:44:25 -05:00
Steven Sherry
ff345aed4a
Release 5.0.0 (#14) 2023-05-04 11:38:12 -05:00
Steven Sherry
6e0e85303a
Release 4.8.0 (#13)
* chore: Update build scripts for Xcode 14.1
2023-05-02 11:07:04 -05:00
Steven Sherry
64202ccaec
Release 4.7.0 (#10)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2023-03-10 09:27:12 -06:00
Steven Sherry
8220cf9c63
Release 4.6.3 (#9)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2023-02-08 11:17:25 -06:00
Steven Sherry
df48de7324
Release 4.6.2 (#8)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2023-01-19 13:29:04 -06:00
Steven Sherry
0b4bb48cea
Release 4.6.0 (#7)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2022-12-05 10:05:43 -06:00
Steven Sherry
f5e8a579ee
Release 4.5.0 (#6)
* chore: Use macos-11 to continue to use Xcode 13.0

* Commit from GitHub Actions (Pre-Release)

Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2022-11-22 10:55:28 -06:00
Steven Sherry
e538cfcd75
Release 4.4.0 (#5)
Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2022-10-31 11:50:29 -05:00
Steven Sherry
c108ae317c
Release 3.7.0 (#4)
* chore: Update pre-release workflow and build-cap script.

Co-authored-by: Steven0351 <Steven0351@users.noreply.github.com>
2022-08-01 15:59:56 -05:00
Steven Sherry
b05663b1a9
Automated publishing (#3)
* chore: Add automated publishing
2022-07-14 11:28:53 -05:00
11 changed files with 208 additions and 94 deletions

View file

@ -0,0 +1,59 @@
name: Build and Release
on:
workflow_call:
inputs:
release-version:
required: true
type: string
draft-flag:
type: string
default: " "
secrets:
XCFRAMEWORK_SIGNING_TOKEN:
required: true
jobs:
build:
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Validate release version
run: |
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
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
run: ./build-cap ${{ inputs.release-version }}
- name: Sign Capacitor xcframework
uses: ionic-team/sign-xcframework@main
with:
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }}
xcframework-path: Capacitor.xcframework
- name: Sign Cordova xcframework
uses: ionic-team/sign-xcframework@main
with:
cert-token: ${{ secrets.XCFRAMEWORK_SIGNING_TOKEN }}
xcframework-path: Cordova.xcframework
- name: Package Capacitor and Cordova
run: ./package-cap ${{ inputs.release-version }}
- name: Push manifest update
uses: EndBug/add-and-commit@v9
- name: Create Release
run: ghr -token ${{ secrets.GITHUB_TOKEN }} -name ${{ inputs.release-version }} ${{ inputs.draft-flag }} -replace ${{ inputs.release-version }} frameworks

21
.github/workflows/dispatch-release.yaml vendored Normal file
View file

@ -0,0 +1,21 @@
name: Dispatch Release
on:
workflow_dispatch:
inputs:
release-version:
description: The version to release
required: true
type: string
draft-flag:
description: "Create a Draft Release or Immediately Release"
type: string
default: " "
jobs:
create-release:
uses: ./.github/workflows/build-and-release.yaml
with:
release-version: ${{ inputs.release-version }}
draft-flag: ${{ inputs.draft-flag }}
secrets: inherit

22
.github/workflows/pre-release.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: Pre-Release
on:
push:
branches:
- "release/**"
jobs:
release-version:
runs-on: ubuntu-latest
outputs:
release-version: ${{ steps.step1.outputs.release_version }}
steps:
- id: step1
run: echo "release_version=${GITHUB_REF#refs/*/*/}" >> $GITHUB_OUTPUT
create-pre-release:
needs: release-version
uses: ./.github/workflows/build-and-release.yaml
with:
release-version: ${{ needs.release-version.outputs.release-version }}
draft-flag: -draft
secrets: inherit

4
.gitignore vendored
View file

@ -1,4 +1,6 @@
capacitor-checkout
*.xcframework
*.zip
.swiftpm
frameworks
.build

4
MEENOW-FORGEJO.md Normal file
View file

@ -0,0 +1,4 @@
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

@ -12,19 +12,19 @@ let package = Package(
.library(
name: "Cordova",
targets: ["Cordova"]
),
)
],
dependencies: [],
targets: [
.binaryTarget(
name: "Capacitor",
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.6.0/Capacitor.xcframework.zip",
checksum: "311a29907502e995fad871428f4889f8c156c43566dc6d616f02d94cdd944197"
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Capacitor.xcframework.zip",
checksum: "134c65a8bd30bfaa8ccb158d78142fa7231bf3f472e4a5d808c5fbed90fd4c75"
),
.binaryTarget(
name: "Cordova",
url: "https://github.com/ionic-team/capacitor-swift-pm/releases/download/3.6.0/Cordova.xcframework.zip",
checksum: "9f562768d83888219ed90840f0d9c0f4e47105d3c45382257339282e8a4ebf9c"
url: "https://git.kico-dev.de/martin/capacitor-swift-pm/raw/commit/916218efd53e6e646c36bbfd71e8f06c1b643fbf/artifacts/Cordova.xcframework.zip",
checksum: "57ff2c8f1e5dcd8d4379ac3cccde1407d81ccd575347dc2aff4f72272b8794a1"
)
]
)

View file

@ -1,3 +1,5 @@
# Experimental Swift Package Manager Support for Capacitor
# Swift Package Manager Support for Capacitor
This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for experimental SPM support.
This repo is for hosting binary xcframework releases of Capacitor and CapacitorCordova for 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.

129
build-cap
View file

@ -1,90 +1,54 @@
#!/bin/bash -eoux pipefail
#!/usr/bin/env bash -eoux pipefail
build_capacitor_simulator() {
xcodebuild archive \
-scheme Capacitor \
-workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS Simulator" \
-archivePath ./Build/iOS-Simulator \
-configuration Debug \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
build_simulator() {
local SCHEME=$1
xcodebuild archive \
-scheme $SCHEME \
-workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS Simulator" \
-configuration Debug \
-archivePath ./Build/$SCHEME-iOS-Simulator \
SKIP_INSTALL=NO \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES \
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym"
}
build_capacitor_ios() {
xcodebuild archive \
-scheme Capacitor \
-workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS" \
-archivePath ./Build/iOS \
SKIP_INSTALL=NO \
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
}
cap_bcsymbol() {
echo -n $(dwarfdump -u $PWD/Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Capacitor | grep -Ewo '[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}')
}
cordova_bcsymbol() {
echo -n $(dwarfdump -u $PWD/Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework/Cordova | grep -Ewo '[[:xdigit:]]{8}(-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}')
build_ios() {
local SCHEME=$1
xcodebuild archive \
-scheme $SCHEME \
-workspace Capacitor.xcworkspace \
-destination "generic/platform=iOS" \
-archivePath ./Build/$SCHEME-iOS \
SKIP_INSTALL=NO \
SWIFT_SERIALIZE_DEBUGGING_OPTIONS=NO \
DEBUG_INFORMATION_FORMAT="dwarf-with-dsym" \
BUILD_LIBRARY_FOR_DISTRIBUTION=YES
}
create_xcframeworks() {
build_capacitor_simulator
build_capacitor_ios
build_simulator Capacitor
build_simulator Cordova
rm -rf ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
rm -rf ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework/Frameworks
build_ios Capacitor
build_ios Cordova
xcodebuild -create-xcframework \
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
-debug-symbols $PWD/Build/iOS.xcarchive/BCSymbolMaps/$(cap_bcsymbol).bcsymbolmap \
-output Capacitor.xcframework
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 \
-framework ./Build/iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
-framework ./Build/iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
-debug-symbols $PWD/Build/iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
-debug-symbols $PWD/Build/iOS.xcarchive/BCSymbolMaps/$(cordova_bcsymbol).bcsymbolmap \
-output Cordova.xcframework
xcodebuild -create-xcframework \
-framework ./Build/Capacitor-iOS-Simulator.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-debug-symbols $PWD/Build/Capacitor-iOS-Simulator.xcarchive/dSYMs/Capacitor.framework.dSYM \
-framework ./Build/Capacitor-iOS.xcarchive/Products/Library/Frameworks/Capacitor.framework \
-debug-symbols $PWD/Build/Capacitor-iOS.xcarchive/dSYMs/Capacitor.framework.dSYM \
-output Capacitor.xcframework
zip -r Capacitor.xcframework.zip Capacitor.xcframework
zip -r Cordova.xcframework.zip Cordova.xcframework
}
write_package_file() {
cat << EOF > Package.swift
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "capacitor-swift-pm",
products: [
.library(
name: "Capacitor",
targets: ["Capacitor", "Cordova"]
),
],
dependencies: [],
targets: [
.binaryTarget(
name: "Capacitor",
url: "$1",
checksum: "$2"
),
.binaryTarget(
name: "Cordova",
url: "$3",
checksum: "$4"
)
]
)
EOF
xcodebuild -create-xcframework \
-framework ./Build/Cordova-iOS-Simulator.xcarchive/Products/Library/Frameworks/Cordova.framework \
-debug-symbols $PWD/Build/Cordova-iOS-Simulator.xcarchive/dSYMs/Cordova.framework.dSYM \
-framework ./Build/Cordova-iOS.xcarchive/Products/Library/Frameworks/Cordova.framework \
-debug-symbols $PWD/Build/Cordova-iOS.xcarchive/dSYMs/Cordova.framework.dSYM \
-output Cordova.xcframework
}
git clone https://github.com/ionic-team/capacitor capacitor-checkout
@ -93,12 +57,5 @@ git checkout $1
create_xcframeworks
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
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/Cordova.xcframework.zip"
cap_cordova_sha=$(shasum -a 256 Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
cd ../../../
write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha
mv Capacitor.xcframework ../../../
mv Cordova.xcframework ../../../

47
package-cap Executable file
View file

@ -0,0 +1,47 @@
#!/usr/bin/env bash -eoux pipefail
mkdir frameworks
zip -r frameworks/Capacitor.xcframework.zip Capacitor.xcframework
zip -r frameworks/Cordova.xcframework.zip Cordova.xcframework
write_package_file() {
cat <<EOF >Package.swift
// swift-tools-version:5.3
import PackageDescription
let package = Package(
name: "capacitor-swift-pm",
products: [
.library(
name: "Capacitor",
targets: ["Capacitor"]
),
.library(
name: "Cordova",
targets: ["Cordova"]
)
],
dependencies: [],
targets: [
.binaryTarget(
name: "Capacitor",
url: "$1",
checksum: "$2"
),
.binaryTarget(
name: "Cordova",
url: "$3",
checksum: "$4"
)
]
)
EOF
}
cap_url="https://github.com/ionic-team/capacitor-swift-pm/releases/download/$1/Capacitor.xcframework.zip"
cap_sha=$(shasum -a 256 frameworks/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/Cordova.xcframework.zip"
cap_cordova_sha=$(shasum -a 256 frameworks/Cordova.xcframework.zip | sed 's/ /\n/g' | head -n1 | xargs echo -n)
write_package_file $cap_url $cap_sha $cap_cordova_url $cap_cordova_sha