2026-04-17 22:08:27 +02:00
# idp.global Swift App
2026-04-18 01:05:22 +02:00
Multiplatform SwiftUI scaffold for the personal `idp.global` companion app on iPhone, iPad, Mac, and Apple Watch.
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
## Included in this first pass
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
- QR and NFC-based device pairing flows with a seeded preview payload fallback
- NFC authentication now attaches a signed GPS position on supported iPhone hardware
- Mocked approval inbox for accepting or rejecting identity requests
- Notification center with local notification permission flow and a test notification trigger
- Apple Watch companion target with a compact approval-first dashboard and request detail flow
- Shared app state and mock backend boundary so a real API can be connected later
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
## Open the project
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
1. Open [IDPGlobal.xcodeproj ](/Users/philkunz/gitea/idp.global-swiftapp/IDPGlobal/IDPGlobal.xcodeproj ).
2. Build the `IDPGlobal` scheme for:
2026-04-17 22:08:27 +02:00
- `My Mac`
2026-04-17 22:32:07 +02:00
- an iPad simulator
2026-04-18 01:05:22 +02:00
- an iPhone simulator
3. Build the `IDPGlobalWatch` scheme for an Apple Watch simulator when you want to verify the companion experience.
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
## Mock QR payload
2026-04-17 22:32:07 +02:00
2026-04-18 01:05:22 +02:00
The app seeds this pairing payload on first launch:
2026-04-17 22:32:07 +02:00
2026-04-18 01:05:22 +02:00
`idp.global://pair?token=swiftapp-demo-berlin&origin=code.foss.global&device=Safari%20on%20Berlin%20MBP`
2026-04-17 22:32:07 +02:00
2026-04-18 01:05:22 +02:00
You can paste it manually, scan it as a QR code, or use the preview pairing action while the backend is still mocked.
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
For NFC authentication, the app reads the pairing payload from the tag, captures the current device location, signs that GPS position, and submits both together.
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
## Next integration step
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
Replace `MockIDPService` with a live service that:
2026-04-17 22:08:27 +02:00
2026-04-18 01:05:22 +02:00
- exchanges the pairing payload and signed NFC location proof for a session token
- loads approval requests and notifications from the backend
2026-04-17 22:08:27 +02:00
- posts approval decisions back to `idp.global`
2026-04-18 01:05:22 +02:00
- syncs session and request state between iPhone and Apple Watch, likely through a shared backend session or WatchConnectivity bridge