{"action":"opened","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/387","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/387/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/387/events","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/387","id":54499077,"number":387,"title":"Crashing on iOS 7","user":{"login":"craig-at-rsg","id":6004181,"avatar_url":"https://avatars.githubusercontent.com/u/6004181?v=3","gravatar_id":"","url":"https://api.github.com/users/craig-at-rsg","html_url":"https://github.com/craig-at-rsg","followers_url":"https://api.github.com/users/craig-at-rsg/followers","following_url":"https://api.github.com/users/craig-at-rsg/following{/other_user}","gists_url":"https://api.github.com/users/craig-at-rsg/gists{/gist_id}","starred_url":"https://api.github.com/users/craig-at-rsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craig-at-rsg/subscriptions","organizations_url":"https://api.github.com/users/craig-at-rsg/orgs","repos_url":"https://api.github.com/users/craig-at-rsg/repos","events_url":"https://api.github.com/users/craig-at-rsg/events{/privacy}","received_events_url":"https://api.github.com/users/craig-at-rsg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-15T20:22:05Z","updated_at":"2015-01-15T20:22:05Z","closed_at":null,"body":"My app is crashing for me on iOS 7 with log lines like:\r\n2015-01-15 15:13:38.709 rMove[155:5003] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIApplication currentUserNotificationSettings]: unrecognized selector sent to instance 0x15524f70'\r\n\r\nIt looks like this is being caused by code in UIApplication_APPLocalNotification.m:\r\n\r\n```\r\n- (BOOL) hasPermissionToScheduleLocalNotifications\r\n{\r\n#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000\r\n    UIUserNotificationType types;\r\n    UIUserNotificationSettings *settings;\r\n\r\n    settings = [[UIApplication sharedApplication]\r\n                currentUserNotificationSettings];\r\n\r\n    types = UIUserNotificationTypeAlert|UIUserNotificationTypeBadge|UIUserNotificationTypeSound;\r\n\r\n    return (settings.types & types);\r\n#else\r\n    return YES;\r\n#endif\r\n}\r\n```\r\n\r\nI think having the check here check for the current device version instead of the max allowed version should fix this, something like:\r\n\r\n```\r\n#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)\r\n```\r\n\r\n\r\n\r\n\r\n\r\n"}}