Summary
On a physical iPhone, the app never receives an APNs device token
(application:didRegisterForRemoteNotificationsWithDeviceToken: never
fires, even after waiting 60 seconds after login and calling
registerForRemoteNotifications). The symptom reproduces identically in
two different apps (different bundle IDs, same Team), over both WiFi
and cellular data, even after a full device restart. Other apps on the
same device (WhatsApp, Gmail, etc.) receive push notifications
normally.
Account details
Team ID: 6NJN39FM4A
Program: Apple Developer Program (Individual), active through June
26, 2027, no pending payments or agreements
Signing Apple ID: my developer Apple ID (account in good standing)
Affected apps (same issue in both)
com.movicolombia.driver
com.movicolombia.passenger
For both App IDs, in Certificates, Identifiers & Profiles, the Push
Notifications capability is checked/enabled (Environment: Sandbox &
Production, Key Restriction: Team Scoped).
Test device
Physical iPhone, iOS 26.5.2, installed directly via Xcode
(flutter run --release, automatic signing, development provisioning
profile — not TestFlight or App Store)
Configuration already verified as correct
Correctly signed entitlements: confirmed by inspecting the device
system log at launch time — the embedded entitlement includes
aps-environment: development and the correct application-identifier.
Push Notifications capability added in Xcode (Signing & Capabilities)
for both targets, with Automatically manage signing on, no
signing/provisioning errors in the build.
APNs authentication key (.p8) uploaded in Firebase Console → Cloud
Messaging → Apple app configuration, applied to both the
development and production rows.
Notification permission granted by the user (confirmed in Settings).
No active Content & Privacy Restrictions.
No VPN or device management profiles installed.
Active iCloud account on the device with the same development Apple ID.
Troubleshooting already performed (all unsuccessful)
Full app reinstall
Full device restart
Test over WiFi — getAPNSToken() nil after 60s
Test over cellular data (WiFi off) — same result
Full build cache wipe (flutter clean + deleting
~/Library/Developer/Xcode/DerivedData) and rebuild from scratch, to
rule out a stale binary
Test with a second app (different bundle ID) on the same device —
same exact failure
Technical detail
After registerForRemoteNotifications is invoked (automatically, by the
Firebase Messaging SDK on app launch), neither
didRegisterForRemoteNotificationsWithDeviceToken: nor
didFailToRegisterForRemoteNotificationsWithError: is ever called. As a
result, FirebaseMessaging.getAPNSToken() (Flutter/FlutterFire) returns
nil indefinitely, and getToken() throws:
[firebase_messaging/apns-token-not-set] APNS token has not been set yet.
Please ensure the APNS token is available by calling getAPNSToken().
I instrumented a polling loop calling getAPNSToken() every second for
60 seconds after login — across more than 10 test runs (WiFi, cellular,
before/after device restart) it never returned a non-nil value.
What I'm hoping to learn
Whether there's something on Apple's side (APNs service state, account/
Team status, or this specific device) preventing this iPhone from
completing push registration for apps signed with this Team ID — since
I've ruled out every app-level, Xcode-level, and Firebase-level
configuration issue I could think of.
Topic:
App & System Services
SubTopic:
Notifications
1
0
95