我注册了推送通知,它在我的iphone上工作正常...我收到所有推送通知...但是当我在ipad mini上运行应用程序时......没有任何反应。允许使用PN,但Ipads的deviceToken不会出现在数据浏览器下...我该怎么办?我究竟做错了什么?那是我的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[Parse setApplicationId:@"UbrfAs5qZsm1JnIsKVH79OtuOfleWxxV98LTXAHI"
clientKey:@"oHEKHzfaV0fkaPGaes2M0H0sQfaWiSnzYCU5lIu1"];
[PFAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
[application registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeSound];
// Override point for customization after application launch.
return YES; }
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
// Store the deviceToken in the current installation and save it to Parse.
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:deviceToken];
[currentInstallation saveInBackground]; }
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo]; }