Requirements
Before you can send pushes, you need an APNs key tied to your Apple Developer account and a build that includes the push entitlement. APNs uses your bundle ID to route notifications to the correct app.Configure APNs
- Apple Developer Portal → Certificates, Identifiers & Profiles → Keys
- Create a new key with Apple Push Notifications service (APNs)
- Download the
.p8file (only available once) - Note your Key ID and Team ID
Environment Variables (API)
Set these on the API server:- Use
APNS_PRODUCTION=falsefor dev builds. - Use
APNS_PRODUCTION=truefor TestFlight/App Store builds.
iOS Entitlement
Ensure APNs entitlement is present inapps/mobile/app.config.ts:
Device Token Registration
The app registers a native device token when the user taps Enable Notifications:apps/mobile/lib/notifications.tsapps/mobile/app/onboarding/push-notifications.tsx
device_tokens and used when your API sends through APNs.
OS Permission Sync
The app re-checks iOS notification permissions whenever it becomes active and updates the backend, so device-level settings are respected even if the in-app toggle is on:apps/mobile/app/_layout.tsxapps/mobile/app/notifications.tsx
Delivery Notes
APNs uses different endpoints for development and production. If the environment does not match the build type, APNs accepts the request but the device will not receive it. Make sure the topic matches your bundle ID (com.launchhq.mobile).