Browse Source

1.修改iOS Apex Mobile关闭推送注册。

Pen Li 8 years ago
parent
commit
d31e571245
1 changed files with 10 additions and 10 deletions
  1. 10 10
      Apex Mobile/Apex Mobile/AppDelegate.m

+ 10 - 10
Apex Mobile/Apex Mobile/AppDelegate.m

@@ -171,16 +171,16 @@ void UncaughtExceptionHandler(NSException *exception) {
         // TODO: alert the user!
         DebugLog(@"couldn't init db");
     
-    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
-    {
-                UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge |UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
-                [[UIApplication sharedApplication]  registerUserNotificationSettings:settings];
-            [[UIApplication sharedApplication] registerForRemoteNotifications ];
-    }
-    else
-    {
-    [[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIUserNotificationTypeBadge |UIUserNotificationTypeSound | UIUserNotificationTypeAlert];
-    }
+//    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
+//    {
+//                UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeBadge |UIUserNotificationTypeSound | UIUserNotificationTypeAlert) categories:nil];
+//                [[UIApplication sharedApplication]  registerUserNotificationSettings:settings];
+//            [[UIApplication sharedApplication] registerForRemoteNotifications ];
+//    }
+//    else
+//    {
+//    [[UIApplication sharedApplication] registerForRemoteNotificationTypes: UIUserNotificationTypeBadge |UIUserNotificationTypeSound | UIUserNotificationTypeAlert];
+//    }
 
 
     NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];