在iphone中解析推送通知
iOS项目中集成的推送通知。不工作 这是我的密码:在iphone中解析推送通知,iphone,ios,xcode,cocos2d-iphone,parse-platform,Iphone,Ios,Xcode,Cocos2d Iphone,Parse Platform,iOS项目中集成的推送通知。不工作 这是我的密码: #ifdef ENABLE_PARSE_PUSH #import "Parse/Parse.h" #endif //in appDelegate didFinishLaunchingWithOptions #ifdef ENABLE_PARSE_PUSH // Obtain the installation object for the current device [Parse setApplicationId:PAR
#ifdef ENABLE_PARSE_PUSH
#import "Parse/Parse.h"
#endif
//in appDelegate didFinishLaunchingWithOptions
#ifdef ENABLE_PARSE_PUSH
// Obtain the installation object for the current device
[Parse setApplicationId:PARSE_APP_ID clientKey:PARSE_APP_SIGNATURE];
PFInstallation *myInstallation = [PFInstallation currentInstallation];
// Save some data
[myInstallation setObject:@"YES" forKey:@"scoreUpdates"];
// Save or Create installation object
[myInstallation saveInBackground];
[application registerForRemoteNotificationTypes:
UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeAlert |
UIRemoteNotificationTypeSound];
#endif
#ifdef ENABLE_PARSE_PUSH
- (void)application:(UIApplication *)application
didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken
{
[PFPush storeDeviceToken:newDeviceToken]; // Send parse the device token
// Subscribe this user to the broadcast channel, ""
[PFPush subscribeToChannelInBackground:@"" block:^(BOOL succeeded, NSError *error) {
if (succeeded)
{
//#ifdef DEBUG
//NSLog(@"Successfully subscribed to the broadcast channel.");
//#endif
}
else
{
//#ifdef DEBUG
//NSLog(@"Failed to subscribe to the broadcast channel.");
//#endif
}
}];
}
- (void)application:(UIApplication *)application
didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
}
#endif
这里有一个对我没有帮助的…尝试了所有建议的解决方案。怎么了..已经在parse.com上传了开发推送SSL。帮我找到解决方案
现在来自parse.com的测试推送消息未在设备中传递。您好,您是否尝试过此逐步解析教程
按照教程进行操作,如果你得到了stack,你可以在这里发布帮助 Ok最终解决了这个问题 •在应用程序id部分中配置push SLL后,我们需要创建新的资源调配配置文件。然后,我们需要使用新的资源调配配置文件
这解决了我的问题,现在从Parse获得测试推送消息。没有问题描述就没有解决方案。“不工作”可能意味着任何事情。当我从parse.com发送推送消息时,它不会传递到任何设备…与我在集成时遵循的链接完全相同…现在重新检查了…没有什么需要检查的,你的应用程序是否正在将安装密钥保存在数据库中?您需要找到问题,请尝试NSlog以获得一些反馈..导出SSL证书时未使用密钥…在我的另一个项目中工作..相同的代码在此中不工作…奇怪