|
|
@@ -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];
|