{"action":"created","issue":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/413","labels_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/413/labels{/name}","comments_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/413/comments","events_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/413/events","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/413","id":57379917,"number":413,"title":"Adding new Local Notification crashes app (iOS8 Simulator)","user":{"login":"breth84","id":2384410,"avatar_url":"https://avatars.githubusercontent.com/u/2384410?v=3","gravatar_id":"","url":"https://api.github.com/users/breth84","html_url":"https://github.com/breth84","followers_url":"https://api.github.com/users/breth84/followers","following_url":"https://api.github.com/users/breth84/following{/other_user}","gists_url":"https://api.github.com/users/breth84/gists{/gist_id}","starred_url":"https://api.github.com/users/breth84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/breth84/subscriptions","organizations_url":"https://api.github.com/users/breth84/orgs","repos_url":"https://api.github.com/users/breth84/repos","events_url":"https://api.github.com/users/breth84/events{/privacy}","received_events_url":"https://api.github.com/users/breth84/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-11T21:28:16Z","updated_at":"2015-02-13T13:20:15Z","closed_at":null,"body":"I've been trying to get Local Notifications to work within an Ionic app, but when arrive the notification app exit with this error:\r\n\r\nApplication Specific Information:\r\n*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CDVDevice didReceiveLocalNotification:]: unrecognized selector sent to instance 0x7ca69520'\r\nterminating with uncaught exception of type NSException\r\nabort() called\r\nCoreSimulator 110.4 - Device: iPhone 6 - Runtime: iOS 8.1 (12B411) - DeviceType: iPhone 6\r\n\r\nI state that I have tried various solutions proposed on this page \"https://github.com/katzer/cordova-plugin-local-notifications/issues/309\" , and checking the files I have the latest version that includes the so-called changes , can anyone help me? \r\n\r\nthanks in advance\r\n\r\nThis my function:\r\n\r\n      function SetNotification(IdMess,messaggio,dataScadenza){\r\n\t              var idProdottoNotificato = IdMess.toString();\r\n\t              window.plugin.notification.local.hasPermission(function () {\r\n\t\t\r\n \t\t\tdataScadenza.setHours(12);\r\n\t\t\t\r\n\t\t\tvar now  = new Date().getTime(),\r\n    \t\t\t_60_seconds_from_now = new Date(now + 60*1000);\r\n\t\t\t\t\r\n\t\r\n\t\t\twindow.plugin.notification.local.add({ \r\n\t\t\t\t\tid: idProdottoNotificato,\r\n\t\t\t\t\tdate: _60_seconds_from_now,\r\n\t\t\t\t\tmessage: messaggio,\r\n\t\t\t\t\tsound : \"www/sounds/beep.caf\",\r\n\t\t\t\t\tbadge: 1,\r\n\t\t\t\t\trepeat: \"daily\",\r\n\t\t\t\t\tautoCancel: true\r\n\t\t\t\t});\r\n\t\t\r\n\t });\r\n\t\t\r\n      }\r\n\r\nThis my $scope:\r\n\r\n          $scope.AggiungiProdotto= function(DispensaSelezionata) {\r\n\t\t\t    var t = $scope.DispensaSelezionata;\r\n\t\t\t\tvar n = $scope.NomeProdotto;\r\n\t\t\t\tvar d = GetFormatDate($scope.DataScadenza);\r\n\t\t\t\tvar g = $scope.GiorniPreavviso;\r\n\t\t\t\tvar IdMess = \"\";\r\n\t\t\t\tvar now = new Date(); \r\n\t\t\t\tvar DPreavv = FunSubtractDays(d,g);\r\n\t\t\t\t\t\t\r\n\t\t\t\tconsole.log(n, t, d, g);\r\n\t\t\t\t\r\n\t\t\t\tif(n==undefined || t == undefined){\r\n\t\t\t\t\t $ionicPopup.alert({\r\n\t\t\t\t\t\t  title: 'Errore',\r\n\t\t\t\t\t\t  content: 'inserisci nome prodotto e/o dispensa'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tif(d==undefined){\r\n\t\t\t\t $ionicPopup.alert({\r\n\t\t\t\t\t\t  title: 'Errore',\r\n\t\t\t\t\t\t  content: 'inserisci la data di scadenza'\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\telse if (DPreavv< now) {\r\n\t\t\t\t\tconsole.log(DPreavv, d, now);\r\n\t\t\t\t\t\t$ionicPopup.alert({\r\n\t\t\t\t\t\t\t  title: 'Errore',\r\n\t\t\t\t\t\t\t  content: 'La data di preavviso non può superare la data di scadenza'\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\t\r\n\t\t\t\tdbRemindUse.transaction(function(e) {\r\n\t\t\t\t\tvar i = \"INSERT INTO prodotti (nome, iddispense, datascadenza, giornipreavviso) VALUES (?, ?, ?, ?)\";\r\n\t\t\t\t\te.executeSql(i, [n, t, d, g], function() {\r\n    \t\t\t\t     $ionicPopup.alert({\r\n\t\t\t\t\t\t  title: 'Fatto',\r\n\t\t\t\t\t\t  content: 'Prodotto Inserito'\r\n\t\t\t\t\t\t }).then(function(res) {\r\n    \t\t\t\t\t\t\t\t window.location.reload(true);    \r\n \t\t\t\t\t\t});\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\ti = \"SELECT last_insert_rowid() as IdProdottoIns\";\r\n\t\t\t\t\t\t\te.executeSql(i, undefined, function(e, t) {\r\n\t\t\t\t\t\t\t\tif (t.rows.length) {\r\n\t\t\t\t\t\t\t\t\tfor (var r = 0; r < t.rows.length; r++) {\r\n\t\t\t\t\t\t\t\t\t\t\t\tvar row = t.rows.item(r);\r\n\t\t\t\t\t\t\t\t\t\t\t\tIdMess = row.IdProdottoIns;\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t//setta notifica\r\n\t\t\t\t\t\t\t\t\t\t SetNotification(IdMess, n + \" In Scadenza\", DPreavv);\r\n\t\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t\t\t}\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}, error)\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}, error)\r\n\t\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/comments/74252112","html_url":"https://github.com/katzer/cordova-plugin-local-notifications/issues/413#issuecomment-74252112","issue_url":"https://api.github.com/repos/katzer/cordova-plugin-local-notifications/issues/413","id":74252112,"user":{"login":"MaZZly","id":1368281,"avatar_url":"https://avatars.githubusercontent.com/u/1368281?v=3","gravatar_id":"","url":"https://api.github.com/users/MaZZly","html_url":"https://github.com/MaZZly","followers_url":"https://api.github.com/users/MaZZly/followers","following_url":"https://api.github.com/users/MaZZly/following{/other_user}","gists_url":"https://api.github.com/users/MaZZly/gists{/gist_id}","starred_url":"https://api.github.com/users/MaZZly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaZZly/subscriptions","organizations_url":"https://api.github.com/users/MaZZly/orgs","repos_url":"https://api.github.com/users/MaZZly/repos","events_url":"https://api.github.com/users/MaZZly/events{/privacy}","received_events_url":"https://api.github.com/users/MaZZly/received_events","type":"User","site_admin":false},"created_at":"2015-02-13T13:20:15Z","updated_at":"2015-02-13T13:20:15Z","body":"Similar problem here..\r\n\r\nStacktrace:\r\n```*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean isEqualToString:]: unrecognized selector sent to instance 0x1043cc420'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x0000000104122f35 __exceptionPreprocess + 165\r\n\t1   libobjc.A.dylib                     0x0000000107229bb7 objc_exception_throw + 45\r\n\t2   CoreFoundation                      0x000000010412a04d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205\r\n\t3   CoreFoundation                      0x000000010408227c ___forwarding___ + 988\r\n\t4   CoreFoundation                      0x0000000104081e18 _CF_forwarding_prep_0 + 120\r\n\t5   Sense                               0x0000000103dc17fa -[APPLocalNotificationOptions stringIsNullOrEmpty:] + 154\r\n\t6   Sense                               0x0000000103dc1123 -[APPLocalNotificationOptions soundName] + 99\r\n\t7   Sense                               0x0000000103dc44ba -[UILocalNotification(APPLocalNotification) __init] + 410\r\n\t8   Sense                               0x0000000103dc42ca -[UILocalNotification(APPLocalNotification) initWithOptions:] + 154\r\n\t9   Sense                               0x0000000103dbc604 __33-[APPLocalNotification schedule:]_block_invoke + 388\r\n\t10  libdispatch.dylib                   0x000000010794aba6 _dispatch_call_block_and_release + 12\r\n\t11  libdispatch.dylib                   0x00000001079687f4 _dispatch_client_callout + 8\r\n\t12  libdispatch.dylib                   0x000000010795315d _dispatch_root_queue_drain + 1097\r\n\t13  libdispatch.dylib                   0x00000001079545d9 _dispatch_worker_thread3 + 111\r\n\t14  libsystem_pthread.dylib             0x0000000107cec6cb _pthread_wqthread + 729\r\n\t15  libsystem_pthread.dylib             0x0000000107cea4a1 start_wqthread + 13\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n```\r\nAdding a notification though safari debug with the exact same code that is run wors like a charm!"}}