Move the app payload under swift/ while keeping git, package.json, and .smartconfig.json at the repo root. This standardizes the Swift app setup so build, test, run, and watch workflows match the other repos.
10
.github/workflows/ci.yml
vendored
@@ -11,11 +11,17 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Enable Corepack
|
||||
run: corepack enable
|
||||
|
||||
- name: Install tooling dependencies
|
||||
run: corepack pnpm install
|
||||
|
||||
- name: Select Xcode
|
||||
run: sudo xcode-select -s /Applications/Xcode.app
|
||||
|
||||
- name: Build macOS app
|
||||
run: xcodebuild build -project "IDPGlobal.xcodeproj" -scheme "IDPGlobal" -destination "platform=macOS" CODE_SIGNING_ALLOWED=NO
|
||||
run: corepack pnpm swift:build:macos
|
||||
|
||||
- name: Run macOS tests
|
||||
run: xcodebuild test -project "IDPGlobal.xcodeproj" -scheme "IDPGlobal" -destination "platform=macOS" CODE_SIGNING_ALLOWED=NO
|
||||
run: corepack pnpm swift:test
|
||||
|
||||
7
.gitignore
vendored
@@ -4,3 +4,10 @@ build/
|
||||
DerivedData/
|
||||
xcuserdata/
|
||||
*.xcuserstate
|
||||
node_modules/
|
||||
.build/
|
||||
.derivedData-*/
|
||||
.deriveddata*/
|
||||
.screenshots/
|
||||
swift/.build/
|
||||
swift/build/
|
||||
|
||||
27
.smartconfig.json
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"@git.zone/tsswift": {
|
||||
"defaultScheme": "IDPGlobal",
|
||||
"defaultConfiguration": "Debug",
|
||||
"derivedDataPath": "swift/.build/xcode-derived-data",
|
||||
"parallelBuilds": true,
|
||||
"parallelTests": false,
|
||||
"buildPlatforms": ["macos", "ios", "ipad"],
|
||||
"testPlatforms": ["macos"],
|
||||
"watchPlatforms": ["macos", "ios", "ipad"],
|
||||
"watchDebounceMs": 1200,
|
||||
"defaultPlatform": "macos",
|
||||
"app": {
|
||||
"bundleId": "global.idp.app"
|
||||
},
|
||||
"targets": {
|
||||
"ios": {
|
||||
"simulatorName": "iPhone Air",
|
||||
"runtime": "latest"
|
||||
},
|
||||
"ipad": {
|
||||
"simulatorName": "iPad mini (A17 Pro)",
|
||||
"runtime": "latest"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
32
README.md
@@ -13,13 +13,43 @@ Multiplatform SwiftUI scaffold for the personal `idp.global` companion app on iP
|
||||
|
||||
## Open the project
|
||||
|
||||
1. Open [IDPGlobal.xcodeproj](/Users/philkunz/gitea/idp.global-swiftapp/IDPGlobal/IDPGlobal.xcodeproj).
|
||||
1. Open `swift/IDPGlobal.xcodeproj`.
|
||||
2. Build the `IDPGlobal` scheme for:
|
||||
- `My Mac`
|
||||
- an iPad simulator
|
||||
- an iPhone simulator
|
||||
3. Build the `IDPGlobalWatch` scheme for an Apple Watch simulator when you want to verify the companion experience.
|
||||
|
||||
## tsswift workflow
|
||||
|
||||
From the repo root:
|
||||
|
||||
```bash
|
||||
corepack pnpm install
|
||||
corepack pnpm swift:doctor
|
||||
corepack pnpm swift:emulators
|
||||
corepack pnpm swift:build
|
||||
corepack pnpm swift:test
|
||||
corepack pnpm swift:run
|
||||
corepack pnpm swift:watch
|
||||
```
|
||||
|
||||
This repo now follows the same layout as the other Swift app repos:
|
||||
|
||||
- git root at the repo root
|
||||
- root `package.json`
|
||||
- root `.smartconfig.json`
|
||||
- Swift app content under `swift/`
|
||||
|
||||
Current `tsswift` behavior here:
|
||||
|
||||
- `build` targets macOS, iPhone Simulator, and iPad Simulator in parallel
|
||||
- `test` targets macOS
|
||||
- `run` defaults to macOS unless you pass `--platform ios` or `--platform ipad`
|
||||
- `watch` rebuilds and relaunches macOS, iPhone, and iPad app instances on file changes
|
||||
|
||||
The Apple Watch companion is still part of the Xcode project, but `tsswift` is currently configured around the main `IDPGlobal` app targets only.
|
||||
|
||||
## Mock QR payload
|
||||
|
||||
The app seeds this pairing payload on first launch:
|
||||
|
||||
18
package.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "idp-global-swiftapp-tooling",
|
||||
"private": true,
|
||||
"packageManager": "pnpm@10.18.1",
|
||||
"scripts": {
|
||||
"swift:doctor": "tsswift doctor --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:emulators": "tsswift emulators --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:build": "tsswift build --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:build:macos": "tsswift build --path swift/IDPGlobal.xcodeproj --platform macos",
|
||||
"swift:test": "tsswift test --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:run": "tsswift run --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:watch": "tsswift watch --path swift/IDPGlobal.xcodeproj",
|
||||
"swift:launch": "tsswift launch --path swift/IDPGlobal.xcodeproj"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@git.zone/tsswift": "0.4.1"
|
||||
}
|
||||
}
|
||||
2250
pnpm-lock.yaml
generated
Normal file
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 1006 B |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 9.5 KiB After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 776 B After Width: | Height: | Size: 776 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |