繁体   English   中英

解析推送通知:iOS设备令牌未定义

[英]Parse push notifications: iOS device token is undefined

我正在使用Cordova(和Intel XDK)为iOS平台开发应用程序。 我正在使用此插件通过Parse平台进行推送通知: https : //github.com/cranberrygame/cordova-plugin-pushnotification-parse

设备已正确注册以解析,但是deviceToken未定义,因此当我发送推送通知时,没有人收到它。

在此处输入图片说明

我不太了解Objective-C,但我知道在此插件的方法中,设备会将令牌发送给Parse,但似乎从未调用过它:

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken
{
        // Call existing method
        [self swizzled_application:application didRegisterForRemoteNotificationsWithDeviceToken:newDeviceToken];
        // Store the deviceToken in the current installation and save it to Parse.
        PFInstallation *currentInstallation = [PFInstallation currentInstallation];
        [currentInstallation setDeviceTokenFromData:deviceToken];
        [currentInstallation saveInBackground];
    }

我的应用程序已在iPhone中启用了通知,而我正在使用iOS 8。

我能怎么做? 提前致谢。

我也面临着同样的问题。

因此,您看到示例代码的通道已注册。 https://github.com/ParsePlatform/PushTutorial/blob/master/iOS/PushNotificationTutorial/AppDelegate.m#L39

并且该方法是成功的。 我想知道我是否需要注册频道吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM