iOS8推送消息、注册通知
来源:互联网 发布:linux中安装jdk 编辑:程序博客网 时间:2024/05/29 17:18
1、ios-push-notifications
https://parse.com/tutorials/ios-push-notifications
2、iOS8推送消息的快速回复处理
http://blog.csdn.net/yujianxiang666/article/details/35260135
3、iOS8注册通知
http://blog.csdn.net/apple_app/article/details/39228221
4、Device token的获得和改变详解
Device token for an iPhone device生成之后就永远不变吗?
不是,if a device is wiped (应该是重装系统), it will get a new device token.
官方网站是这样写的: If the user restores backup data to a new device or computer, or reinstalls the operating system, the device token changes
正是因为device有可能改变,所以建议在app start时(即在didFinishLaunchingWithOptions 里)调用registerForRemoteNotificationTypes来获取device token以检查device token是否改变,如果改变了就应该把新token传给push provider。(官方描述:An application should register every time it launches and give its provider the current token)
device token应该存储在NSUserDefaults来达到新旧比较的目的
那么旧device token在push provider对应的record怎么办?
方案1:把旧device token send to provider and request delete record
方案2:使用apns feedback service。
方案2可能更好些,因为总是需要使用apns feedback service来处理用户在device里删除app的情况。
调用registerForRemoteNotificationTypes方法后,成功注册后,APNS就会返回一个device token,然后回调delegate methoddidRegisterForRemoteNotificationsWithDeviceToken, 如果注册失败,则回调delegate method didFailToRegisterForRemoteNotificationsWithError。
注意:
* 在第一次调用registerForRemoteNotificationTypes方法时没有联网,则既不会调用didRegisterForRemoteNotificationsWithDeviceToken,也不会调用didFailToRegisterForRemoteNotificationsWithError
*在第一次调用registerForRemoteNotificationTypes注册成功后,之后即使没有联网,再调用registerForRemoteNotificationTypes时都会以最上一次的device token作为参数回调didRegisterForRemoteNotificationsWithDeviceToken方法。
* (官方描述) If your application has previously registered, calling registerForRemoteNotificationTypes:
results in the operating system passing the device token to the delegate immediately without incurring additional overhead.
上述东东参考官方网站关于Registering for Remote Notifications的讲解
- iOS8推送消息、注册通知
- 【IOS】IOS8推送消息注册 通知
- ios8注册推送通知
- IOS8注册推送消息
- ios8 注册本地推送通知
- 【IOS】ios8推送消息注册
- iOS8.0推送通知的注册方法
- ios7与ios8并存,注册推送通知
- IOS开发之 ---- IOS8推送消息注册
- IOS开发之 ---- IOS8推送消息注册
- iOS8 注册推送
- iOS8注册推送
- iOS iOS8注册通知
- iOS iOS8注册通知
- iOS iOS8注册通知
- iOS8注册通知
- iOS iOS8注册通知
- iOS iOS8注册通知
- C语言error C2371: '****' : redefinition; different basic types
- windows下Java中使用Protocol Buffer总结
- SOAP基础知识
- Android ExpandableListView简单例子(附加时间模拟器)-FenGKun
- android out of memory(OOM)
- iOS8推送消息、注册通知
- Hindawi Open Access 旗下杂志
- 初探 iOS8 中的 Size Class
- IRedisTransaction
- 指针,引用和对象化实例
- 练手小项目(2)-生活小助手--周公解梦
- VC消灭任务栏图标
- linux共享库版本升级
- Android抽象布局——include、merge 、ViewStub