dev*_*jac 17 iphone notifications ios8 cloudkit cksubscription
到目前为止,我无法订阅工作.(在我的设备上收到推送通知,订阅似乎已成功创建)
我一直在玩[CloudKitAtlas] [1].我在该自述文件的自述文件中做了它所说的内容:
要求
建立
- iOS 8.0 SDK和Xcode 6
- 在iCloud中启用CloudKit授权(来自功能)
- 更改容器名称以在开发者帐户中设置容器
我能够启动应用程序,它成功注册远程通知:
2014-06-09 11:15:17.712 CloudKitAtlas [841:220562]已注册使用令牌的推送通知:
我也能够创建记录,查询和订阅:
2014-06-09 11:15:21.966 CloudKitAtlas [841:220934]订阅了Item
如果我转到仪表板,我会看到几个订阅.但是当我创建新记录时没有任何反应,回调:
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)info
Run Code Online (Sandbox Code Playgroud)
永远不会执行(注意:我在iPhone 5S上运行应用程序,而不是在模拟器上运行)
我正在使用带有显式bundle id(没有通配符)的调试签名,对于这个app id我也创建了相应的推送通知证书,虽然我只是下载它们,因为我与这些文件无关.
更新15/06/14显然这是苹果方面的一个错误,让我们等几个星期. https://developer.apple.com/library/content/samplecode/CloudAtlas/Introduction/Intro.html#//apple_ref/doc/uid/TP40014599
更新18/05/15
如果有人想知道很久以前Apple已经解决了这个问题,现在它就像魅力一样,虽然你需要做一些考虑:
Run Code Online (Sandbox Code Playgroud)UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes: UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert categories:nil];[application registerUserNotificationSettings:settings];
就这样
小智 -1
registerForRemoteNotificationTypes:types NS_DEPRECATED_IOS(3_0, 8_0, "请改用 registerForRemoteNotifications 和 registerUserNotificationSettings:");
// 返回启用的类型,同时考虑所有系统范围的设置;与连接性无关。
enabledRemoteNotificationTypes NS_DEPRECATED_IOS(3_0, 8_0, "请使用 -[UIApplication isRegisteredForRemoteNotifications] 或 -[UIApplication currentUserNotificationSettings] 检索用户启用的远程通知和用户通知设置");
从 iOS8 开始它被弃用不是原因,可能会是?
| 归档时间: |
|
| 查看次数: |
2251 次 |
| 最近记录: |