2017-02-03 46 views
5

当我安装的应用程序,第一次和它要求的权限得到通知,如果我按是,那么产生的设备令牌,但每当我重新启动应用程序,我得到的错误:是否在iOS中启动应用程序时刷新注册令牌?

Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 "(null) 

任何人都可以告诉设备令牌是否在每次启动应用程序时生成?

+0

检查:[http://stackoverflow.com/questions/6652242/does-the-apns-device-token-ever-change-once-created](http://stackoverflow.com/questions/6652242/does -the-apns-device-token-ever-change-once-created)和[http://stackoverflow.com/a/40169657/5575752](http://stackoverflow.com/a/40169657/5575752) –

回答

3

没有。每次启动应用程序时都不会生成(新)令牌。它在首次启动时生成(即在应用程序安装后首次启动)。从docs

By default, the FCM SDK generates a registration token for the client app instance on initial startup of your app.

但它可能(也从文档)在以下情况下的变化:

The registration token may change when:

  • The app deletes Instance ID
  • The app is restored on a new device
  • The user uninstalls/reinstall the app
  • The user clears app data.
+0

谢谢对于答案 –

+0

不用担心。干杯! :) –

相关问题