oteNotificationsWithDeviceToken叫

oteNotificationsWithDeviceToken叫

本文介绍了当didRegisterForRemoteNotificationsWithDeviceToken叫什么名字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有很多关于didRegisterForRemoteNotificationsWithDeviceToken问题,但他们都回避一个很直接的问题,我似乎无法找到一个确切的答案。

对于正确设置了通知,在其他方面并有适当的网络连接的应用程序:当didRegisterForRemoteNotificationsWithDeviceToken叫什么名字?一些可能的选择可能是:


  1. 每次应用程序启动

  2. 初始提示用户只有在接受推送通知

  3. 别的东西吗?


解决方案

应用程序代表将呼吁的远程通知注册成功的方法,你在你的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叫什么名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 18:31