1

我在我的应用程序中编写了推送通知的代码如下:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
     [Parse setApplicationId:kPARSEAPPID clientKey:kPARSECLIENTKEY];
     // Override point for customization after application launch.
    [application registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|UIRemoteNotificationTypeBadge|UIRemoteNotificationTypeSound]; 
}

但是在下面的方法中控制不去。

-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
    NSString *str = [NSString 
                     stringWithFormat:@"Device Token=%@",deviceToken];
    NSLog(@"str=%@",str);
    [PFPush storeDeviceToken:deviceToken];

}

我的代码应该有什么问题?任何想法?

提前谢谢...

4

0 回答 0