-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(iOS): Adding Capacitor Web APIs (#4)
- Loading branch information
1 parent
ffac505
commit 7daa335
Showing
96 changed files
with
3,026 additions
and
5,357 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
lint: | ||
name: Lint Code | ||
runs-on: macos-latest | ||
timeout-minutes: 10 | ||
steps: | ||
- name: Setup | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.16.0 | ||
cache: 'npm' | ||
- uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
- name: Npm Install | ||
run: | | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" >> ~/.npmrc | ||
pnpm install | ||
- name: Run Linters | ||
run: pnpm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
unittest-ios: | ||
runs-on: macos-13 | ||
timeout-minutes: 30 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: List available Xcode versions | ||
run: ls /Applications | grep Xcode | ||
- name: Select Xcode | ||
run: sudo xcode-select -switch /Applications/Xcode_14.3.1.app && /usr/bin/xcodebuild -version | ||
- name: Run ios-engine unit tests | ||
run: cd ./packages/ios-engine && swift package clean && swift test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
import { CapacitorConfig } from '@capacitor/cli'; | ||
import { CapacitorConfig } from "@capacitor/cli"; | ||
|
||
const config: CapacitorConfig = { | ||
appId: 'io.ionic.starter', | ||
appName: 'example-app', | ||
webDir: 'build', | ||
appId: "io.ionic.starter", | ||
appName: "example-app", | ||
webDir: "build", | ||
bundledWebRuntime: false, | ||
plugins: { | ||
"BackgroundRunner": { | ||
"runners": [ | ||
{ | ||
label: "com.example.background", | ||
src: "background.js", | ||
event: "updateSystem", | ||
repeat: false, | ||
interval: 2, | ||
// TODO: Add Android / iOS constraints | ||
} | ||
] | ||
} | ||
} | ||
BackgroundRunner: { | ||
label: "com.example.background.task", | ||
src: "background.js", | ||
event: "monitorLocation", | ||
repeat: true, | ||
interval: 2, | ||
autoStart: true, | ||
// TODO: Add Android / iOS constraints | ||
}, | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.