Skip to content

Commit 2579bcc

Browse files
authored
feat: Adding Swift Package Manager support (#137)
* Starting on adding SPM support * Moving ios-engine into SPM package * Bumping ios deployment target * Making adjustments for SPM and Cocoapds compatibility * Updating test apps * Fixing iOS unit tests * Using installed github runner ios version * Fixing min iOS version * adding changeset * Removing android project from SPM example app * Updating lockfile * Updating plugin ios verify scripts for SPM * Updating .gitignore for SPM * Adding PNPM to unit test job * Updating Android capacitor plugin name to match changes * re-rendering docs?
1 parent 31276a7 commit 2579bcc

File tree

113 files changed

+3148
-1686
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+3148
-1686
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@capacitor/background-runner": minor
3+
---
4+
5+
iOS: Adding support for Swift Package Manager

.github/workflows/reusable_unit-tests.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717
token: ${{ secrets.CAP_GH_RELEASE_TOKEN || github.token }}
18+
- name: Install PNPM
19+
uses: pnpm/action-setup@v4
20+
id: pnpm-install
21+
with:
22+
version: 10
23+
run_install: false
1824
- name: List available Xcode versions
1925
run: ls /Applications | grep Xcode
20-
- name: Select Xcode
21-
run: sudo xcode-select -switch /Applications/Xcode_16.2.0.app && /usr/bin/xcodebuild -version
2226
- name: Run ios-engine unit tests
23-
run: cd ./packages/ios-engine && swift package clean && swift test
27+
run: |
28+
cd ./packages/capacitor-plugin
29+
pnpm run verify:ios
2430
2531
unit-test-android:
2632
runs-on: macos-13

apps/example-app-spm/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
.vscode
21+
.idea
22+
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
26+
27+
# Optional eslint cache
28+
.eslintcache

apps/example-app-spm/CHANGELOG.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Change Log
2+
3+
## 1.0.9
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [2eda1d1]
8+
- Updated dependencies [b76dbd4]
9+
- Updated dependencies [a484f9f]
10+
- Updated dependencies [ef998c1]
11+
- Updated dependencies [8ef1ca0]
12+
- @capacitor/background-runner@2.2.0
13+
14+
## 1.0.8
15+
16+
### Patch Changes
17+
18+
- Updated dependencies [0e13e79]
19+
- @capacitor/background-runner@2.1.0
20+
21+
## 1.0.7
22+
23+
### Patch Changes
24+
25+
- Updated dependencies [4cc44dd]
26+
- Updated dependencies [7adb608]
27+
- Updated dependencies [36d9a61]
28+
- Updated dependencies [4957271]
29+
- Updated dependencies [3194a7d]
30+
- @capacitor/background-runner@2.0.0
31+
32+
## 1.0.6
33+
34+
### Patch Changes
35+
36+
- Updated dependencies [174f2fe]
37+
- Updated dependencies [11124d2]
38+
- Updated dependencies [142e96d]
39+
- Updated dependencies [18f72b6]
40+
- Updated dependencies [d6511b2]
41+
- Updated dependencies [b09f30e]
42+
- @capacitor/background-runner@1.1.0
43+
44+
All notable changes to this project will be documented in this file.
45+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
46+
47+
## [1.0.5](https://github.com/ionic-team/capacitor-background-runner/compare/1.0.4...1.0.5) (2023-08-17)
48+
49+
**Note:** Version bump only for package example-app
50+
51+
## [1.0.4](https://github.com/ionic-team/capacitor-background-runner/compare/1.0.3...1.0.4) (2023-08-10)
52+
53+
**Note:** Version bump only for package example-app
54+
55+
## [1.0.3](https://github.com/ionic-team/capacitor-background-runner/compare/1.0.2...1.0.3) (2023-08-10)
56+
57+
**Note:** Version bump only for package example-app
58+
59+
## [1.0.2](https://github.com/ionic-team/capacitor-background-runner/compare/1.0.1...1.0.2) (2023-08-10)
60+
61+
**Note:** Version bump only for package example-app
62+
63+
## [1.0.1](https://github.com/ionic-team/capacitor-background-runner/compare/1.0.0...1.0.1) (2023-08-09)
64+
65+
### Bug Fixes
66+
67+
- setting JavaVersion to 17 ([#14](https://github.com/ionic-team/capacitor-background-runner/issues/14)) ([5844d0c](https://github.com/ionic-team/capacitor-background-runner/commit/5844d0c814378b9c4ebafe752c297d7110e8c2ba))
68+
- Supporting post install script on Windows ([#12](https://github.com/ionic-team/capacitor-background-runner/issues/12)) ([75b4ed0](https://github.com/ionic-team/capacitor-background-runner/commit/75b4ed0cdb44c4caa506c9969b7fdbbe2e122779))
69+
70+
# 1.0.0 (2023-07-18)
71+
72+
### Features
73+
74+
- Android JS Engine / Plugin ([#6](https://github.com/ionic-team/enterprise-background-runner/issues/6)) ([1f52918](https://github.com/ionic-team/enterprise-background-runner/commit/1f52918784d91558a3e7798d5449887d7fb5cd32))
75+
- Capacitor Plugin ([#3](https://github.com/ionic-team/enterprise-background-runner/issues/3)) ([ffac505](https://github.com/ionic-team/enterprise-background-runner/commit/ffac505560c144d2478ed6de49dc7d0c5130b15c))
76+
- **iOS:** Adding Capacitor Web APIs ([#4](https://github.com/ionic-team/enterprise-background-runner/issues/4)) ([7daa335](https://github.com/ionic-team/enterprise-background-runner/commit/7daa3350335989e8caf20c7258074a6dfa5d2cfe))
77+
78+
# 1.0.0-rc.1 (2023-07-18)
79+
80+
### Features
81+
82+
- Android JS Engine / Plugin ([#6](https://github.com/ionic-team/capacitor-background-runner/issues/6)) ([1f52918](https://github.com/ionic-team/capacitor-background-runner/commit/1f52918784d91558a3e7798d5449887d7fb5cd32))
83+
- Capacitor Plugin ([#3](https://github.com/ionic-team/capacitor-background-runner/issues/3)) ([ffac505](https://github.com/ionic-team/capacitor-background-runner/commit/ffac505560c144d2478ed6de49dc7d0c5130b15c))
84+
- **iOS:** Adding Capacitor Web APIs ([#4](https://github.com/ionic-team/capacitor-background-runner/issues/4)) ([7daa335](https://github.com/ionic-team/capacitor-background-runner/commit/7daa3350335989e8caf20c7258074a6dfa5d2cfe))
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// <reference types="@capacitor/background-runner" />
2+
3+
import { CapacitorConfig } from "@capacitor/cli";
4+
5+
const config: CapacitorConfig = {
6+
appId: "io.ionic.starter",
7+
appName: "example-app",
8+
webDir: "build",
9+
bundledWebRuntime: false,
10+
plugins: {
11+
BackgroundRunner: {
12+
label: "com.example.background.task",
13+
src: "background.js",
14+
event: "monitorLocation",
15+
repeat: true,
16+
interval: 2,
17+
autoStart: false,
18+
},
19+
},
20+
};
21+
22+
export default config;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"name": "example-app",
3+
"integrations": {
4+
"capacitor": {}
5+
},
6+
"type": "react"
7+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
App/build
2+
App/Pods
3+
App/output
4+
App/App/public
5+
DerivedData
6+
xcuserdata
7+
8+
# Cordova plugins for Capacitor
9+
capacitor-cordova-ios-plugins
10+
11+
# Generated Config files
12+
App/App/capacitor.config.json
13+
App/App/config.xml

0 commit comments

Comments
 (0)