Commit fa87fdc5 by Sebastián Katzer

Merge pull request #280 from timothyjasonwilliams/0.7

correctly check ios version
parents f82b9d32 24354dce
......@@ -238,7 +238,7 @@
*/
- (void) promptForPermission:(CDVInvokedUrlCommand *)command
{
#ifdef __IPHONE_8_0
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
UIUserNotificationType types =
UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;
......@@ -249,7 +249,7 @@
[[UIApplication sharedApplication]
registerUserNotificationSettings:settings];
}];
#endif
}
}
/**
......@@ -257,7 +257,7 @@
*/
- (BOOL) hasPermissionToSheduleNotifications
{
#ifdef __IPHONE_8_0
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
UIUserNotificationSettings *settings = [[UIApplication sharedApplication]
currentUserNotificationSettings];
......@@ -265,9 +265,9 @@
UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;
return (settings.types & requiredTypes);
#else
} else {
return YES;
#endif
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment