Uruchamianie aplikacji demonstracyjnej FCM na moim iPhone nie działa - identyfikator Firebase to zero.Identyfikator instancji Firebase FCM jest zerowy (aplikacja szybkiej instalacji na prawdziwym urządzeniu)
Kroki do odtworzenia:
pod try Firebase
i uruchom10: quickstart-ios/messaging/FCM.xcodeproj
- Skopiuj mój plik
GoogleService-Info.plist
do projektu - Uruchom aplikację się na 5s iPhone (iOS 9.3.2)
- Zaakceptuj okno dialogowe z prośbą o pozwolenie na wysyłanie powiadomień
- Kliknij przyciski
- Instancja Id Token jest nil
My Mac posiada odpowiednie certyfikaty, aby rozwijać i wdrażać aplikacje:
- mam zarówno dystrybucja iOS i iOS Provisioning rozwój profile, wybrane za pomocą 'automatyczny' ustawienia.
- Mam zainstalowany zarówno dystrybucja iOS i certyfikaty rozwoju iOS, kod podpisany przy użyciu „automatyczne: iPhone Developer” opcja
- mam „produkcja” certyfikat SSL zainstalowane: „Jabłko powiadomień push usług SSL (Piaskownica & Produkcja)”
widzę dużo hałasu w dziennikach, ale najbardziej znaczący jest ten błąd:
Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
Oto pełna moc konsoli:
2016-06-25 16:15:08.339 FCM[7398:4128979] Configuring the default app.
2016-06-25 16:15:08.383 FCM[7398:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started
2016-06-25 16:15:08.396: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-25 16:15:08.397: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null)"
2016-06-25 16:15:08.403: <FIRMessaging/INFO> FIRMessaging library version 1.1.0
2016-06-25 16:15:08.413: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2016-06-25 16:15:08.443 FCM[7398:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2016-06-25 16:15:08.508 FCM[7398:] <FIRAnalytics/INFO> Firebase Analytics enabled
2016-06-25 16:15:08.538: <FIRInstanceID/WARNING> APNS Environment in profile: development
2016-06-25 16:15:08.848 FCM[7398:4128979] Connected to FCM.
2016-06-25 16:15:08.893: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:15:22.311: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:15:36.774 FCM[7398:4128979] Unable to connect to FCM. Error Domain=com.google.fcm Code=2001 "(null)"
2016-06-25 16:15:40.552 FCM[7398:4128979] Subscribed to news topic
2016-06-25 16:15:43.100 FCM[7398:4128979] InstanceID token: (null)
2016-06-25 16:15:49.036: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:16:31.022: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:17:32.976: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:17:32.976: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries
2016-06-25 16:19:10.662 FCM[7398:4128979] InstanceID token: (null)
2016-06-25 16:19:10.980: <FIRInstanceID/WARNING> Failed to fetch default token Error Domain=com.firebase.iid Code=0 "(null)"
2016-06-25 16:19:10.981: <FIRInstanceID/WARNING> Failed to retrieve the default GCM token after 5 retries
Widząc takie same na iPad 2 (9.3). – IanS
Pamiętaj, że problem występuje tylko wtedy, gdy zostanie wdrożony na prawdziwym urządzeniu. Działa dobrze na symulatorze, co oznacza, że mój profil udostępniania i certyfikaty są poprawne, prawda? – IanS
Możliwy duplikat [Powiadomienia do Firebase APNS nie udało się pobrać tokenu] (http://stackoverflow.com/questions/37438369/apns-firebase-notification-failed-to-fetch-token) –