APNS Firebase Notification failed to fetch token

后端 未结 6 2194
轻奢々
轻奢々 2020-12-13 09:53

For Swift3 / iOS10 see this link:

ios10, Swift 3 and Firebase Push Notifications (FCM)

I\'m trying to use the Firebase for Notifications and

6条回答
  •  隐瞒了意图╮
    2020-12-13 10:12

    After trying all of the above (and anything I could find elsewhere), what resolves the problem for me is to move

    let token = FIRInstanceID.instanceID().token()
    

    to be called when pressing a button, and not on app loading.

    I know it's probably not the most elegant solution, but it's good enough for debugging purposes. Im guessing the token is not available immediately by the server, and takes some time to be generated.

提交回复
热议问题