【发布时间】:2014-06-18 21:33:48
【问题描述】:
我目前无法让 Parse(推送通知服务)在现有 iOS 应用上运行。具体来说,
[PFInstallation currentInstallation] 总是返回一个 nil 值。在我的didFinishLaunchingWithOptions 方法中我设置了
[Parse setApplicationId:parseAppID clientKey:parseClientKey];
然而,一旦我的applicationDidRegisterForRemoteNotificationsWithDeviceToken 方法被调用,下面的代码就会为currentInstallation 返回nil。
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:_deviceToken];
[currentInstallation saveInBackground];
我不确定为什么在尝试将其合并到现有应用程序时会发生这种情况。我正在做与空白应用程序相同的事情,并且 Parse 在那里工作得很好。请注意,不会抛出任何错误。我只是在[PFInstallation currentInstallation] 上得到零回报,所以什么都没有保存。
任何帮助将不胜感激。
【问题讨论】:
标签: ios objective-c push-notification parse-platform