|
|
@@ -85,7 +85,12 @@
|
|
|
#pragma mark - Notification
|
|
|
|
|
|
- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
|
|
|
- [application registerForRemoteNotifications];
|
|
|
+
|
|
|
+ #if TARGET_IPHONE_SIMULATOR//模拟器
|
|
|
+
|
|
|
+ #elif TARGET_OS_IPHONE//真机
|
|
|
+ [application registerForRemoteNotifications];
|
|
|
+ #endif
|
|
|
NSLog(@"Fail To Register Remote Notification: %@",error);
|
|
|
}
|
|
|
|