问题描述
有很多关于didRegisterForRemoteNotificationsWithDeviceToken问题,但他们都回避一个很直接的问题,我似乎无法找到一个确切的答案。
对于正确设置了通知,在其他方面并有适当的网络连接的应用程序:当didRegisterForRemoteNotificationsWithDeviceToken叫什么名字?一些可能的选择可能是:
- 每次应用程序启动
- 初始提示用户只有在接受推送通知
- 别的东西吗?
应用程序代表将呼吁的远程通知注册成功的方法,你在你的UIApplication调用此方法后:
According to: http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIApplication_Class/Reference/Reference.html
Now, to elaborate further, normally an app will call the registerForRemoteNotificationTypes in your didFinishLaunchingWithOptions:(NSDictionary *)launchOptions in your application delegate. And therefore, the application:didRegisterForRemoteNotificationsWithDeviceToken is then usually called moments after the launch of the application.
Edit: The application:didRegisterForRemoteNotificationsWithDeviceToken still gets called for subsequents registration after the first.
这篇关于当didRegisterForRemoteNotificationsWithDeviceToken叫什么名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!