{"action":"opened","issue":{"url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/146","repository_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm","labels_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/146/labels{/name}","comments_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/146/comments","events_url":"https://api.github.com/repos/fechanique/cordova-plugin-fcm/issues/146/events","html_url":"https://github.com/fechanique/cordova-plugin-fcm/issues/146","id":182957248,"number":146,"title":"[IOS] Notification not shown while in Background until app is started.","user":{"login":"BananZGan","id":18245334,"avatar_url":"https://avatars.githubusercontent.com/u/18245334?v=3","gravatar_id":"","url":"https://api.github.com/users/BananZGan","html_url":"https://github.com/BananZGan","followers_url":"https://api.github.com/users/BananZGan/followers","following_url":"https://api.github.com/users/BananZGan/following{/other_user}","gists_url":"https://api.github.com/users/BananZGan/gists{/gist_id}","starred_url":"https://api.github.com/users/BananZGan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BananZGan/subscriptions","organizations_url":"https://api.github.com/users/BananZGan/orgs","repos_url":"https://api.github.com/users/BananZGan/repos","events_url":"https://api.github.com/users/BananZGan/events{/privacy}","received_events_url":"https://api.github.com/users/BananZGan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-14T03:47:23Z","updated_at":"2016-10-14T03:47:23Z","closed_at":null,"body":"Hi, the target runtime of my project is ios 9.2 (I have also tried 8.x they worked the same).\r\nthe notification shows correctly in android but the notification never shows up in IOS\r\nunless I launch the apps and it will be shown.\r\n\r\nHere is my log:\r\n\r\n2016-10-14 11:32:34.904 testFCMIonic[24006:726909] Apache Cordova native platform version 4.2.1 is starting.\r\n2016-10-14 11:32:34.905 testFCMIonic[24006:726909] Multi-tasking -> Device: YES, App: YES\r\n2016-10-14 11:32:35.086 testFCMIonic[24006:726909] Using UIWebView\r\n2016-10-14 11:32:35.088 testFCMIonic[24006:726909] [CDVTimer][handleopenurl] 0.074983ms\r\n2016-10-14 11:32:35.090 testFCMIonic[24006:726909] [CDVTimer][intentandnavigationfilter] 2.550006ms\r\n2016-10-14 11:32:35.091 testFCMIonic[24006:726909] [CDVTimer][gesturehandler] 0.087023ms\r\n2016-10-14 11:32:35.165 testFCMIonic[24006:726909] [CDVTimer][splashscreen] 74.115992ms\r\n2016-10-14 11:32:35.174 testFCMIonic[24006:726909] [CDVTimer][statusbar] 8.768976ms\r\n2016-10-14 11:32:35.175 testFCMIonic[24006:726909] [CDVTimer][keyboard] 1.334012ms\r\n2016-10-14 11:32:35.176 testFCMIonic[24006:726909] [CDVTimer][TotalPluginStartup] 88.104010ms\r\n2016-10-14 11:32:35.190 testFCMIonic[24006:726909] DidFinishLaunchingWithOptions\r\n2016-10-14 11:32:35.194 testFCMIonic[24006:726909] Configuring the default app.\r\n2016-10-14 11:32:35.217 testFCMIonic[24006:] <FIRAnalytics/INFO> Firebase Analytics v.3200000 started\r\n2016-10-14 11:32:35.223 testFCMIonic[24006:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)\r\n2016-10-14 11:32:35.226 testFCMIonic[24006:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist\r\n2016-10-14 11:32:35.245: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add \"FirebaseAppDelegateProxyEnabled\" to your Info.plist and set it to NO\r\n2016-10-14 11:32:35.246: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=com.firebase.iid Code=1001 \"(null)\"\r\n2016-10-14 11:32:35.248: <FIRMessaging/INFO> FIRMessaging library version 1.1.0\r\n2016-10-14 11:32:35.252: <FIRMessaging/WARNING> FIRMessaging AppDelegate proxy enabled, will swizzle app delegate remote notification receiver handlers. Add \"FirebaseAppDelegateProxyEnabled\" to your Info.plist and set it to NO\r\n2016-10-14 11:32:35.254 testFCMIonic[24006:726909] app become active\r\n2016-10-14 11:32:35.677: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=NSCocoaErrorDomain Code=3010 \"REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION\" UserInfo={NSLocalizedDescription=REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION}\r\n2016-10-14 11:32:35.679: <FIRInstanceID/WARNING> Failed to fetch APNS token Error Domain=NSCocoaErrorDomain Code=3010 \"REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION\" UserInfo={NSLocalizedDescription=REMOTE_NOTIFICATION_SIMULATOR_NOT_SUPPORTED_NSERROR_DESCRIPTION}\r\n2016-10-14 11:32:35.721 testFCMIonic[24006:726909] Resetting plugins due to page load.\r\n2016-10-14 11:32:35.766 testFCMIonic[24006:] <FIRAnalytics/INFO> Firebase Analytics enabled\r\n2016-10-14 11:32:35.955 testFCMIonic[24006:726909] Connected to FCM.\r\n2016-10-14 11:32:35.962 testFCMIonic[24006:726909] Message ID: (null)\r\n2016-10-14 11:32:35.963 testFCMIonic[24006:726909] {\r\n    body = bodyssdf;\r\n    \"collapse_key\" = \"com.ionicframework.testfcmionic490110\";\r\n    from = \"/topics/all\";\r\n    notification =     {\r\n        badge = 0;\r\n        body = bodyssdf;\r\n        \"click_action\" = \"FCM_PLUGIN_ACTIVITY\";\r\n        e = 1;\r\n        icon = \"fcm_push_icon\";\r\n        sound = default;\r\n        sound2 = default;\r\n        title = test;\r\n    };\r\n    title = test;\r\n}\r\n2016-10-14 11:32:35.963 testFCMIonic[24006:726909] app active\r\n2016-10-14 11:32:36.020 testFCMIonic[24006:726909] Finished load of: file:///*my file*/Developer/CoreSimulator/Devices/A9733E04-5912-44B9-9FC6-E9BE7A75C54B/data/Containers/Bundle/Application/647E730A-20FA-4157-90BB-F77406F3A6E0/testFCMIonic.app/www/index.html#/tab/dash\r\n2016-10-14 11:32:36.188 testFCMIonic[24006:726909] Cordova view ready\r\n2016-10-14 11:32:36.269 testFCMIonic[24006:726909] THREAD WARNING: ['StatusBar'] took '10.082031' ms. Plugin should use a background thread.\r\n2016-10-14 11:32:36.269 testFCMIonic[24006:726909] view registered for notifications\r\n2016-10-14 11:32:36.270 testFCMIonic[24006:726909] FCMPlugin.js: is created\r\n2016-10-14 11:32:36.270 testFCMIonic[24006:726909] FCMPlugin Ready OK\r\n2016-10-14 11:32:36.274 testFCMIonic[24006:726909] onNotification callback successfully registered: null\r\n2016-10-14 11:32:57.950 testFCMIonic[24006:726909] app entered background\r\n2016-10-14 11:32:57.951 testFCMIonic[24006:726909] Set state background\r\n2016-10-14 11:32:57.951 testFCMIonic[24006:726909] Disconnected from FCM\r\n2016-10-14 11:33:09.508 testFCMIonic[24006:726909] app become active\r\n2016-10-14 11:33:09.508 testFCMIonic[24006:726909] Set state foreground\r\n2016-10-14 11:33:09.616 testFCMIonic[24006:726909] Connected to FCM.\r\n2016-10-14 11:33:09.635 testFCMIonic[24006:726909] Message ID: (null)\r\n2016-10-14 11:33:09.635 testFCMIonic[24006:726909] {\r\n    body = bodyssdf;\r\n    \"collapse_key\" = \"com.ionicframework.testfcmionic490110\";\r\n    from = \"/topics/all\";\r\n    notification =     {\r\n        badge = 0;\r\n        body = bodyssdf;\r\n        \"click_action\" = \"FCM_PLUGIN_ACTIVITY\";\r\n        e = 1;\r\n        icon = \"fcm_push_icon\";\r\n        sound = default;\r\n        sound2 = default;\r\n        title = test;\r\n    };\r\n    title = test;\r\n}\r\n2016-10-14 11:33:09.635 testFCMIonic[24006:726909] app active\r\n2016-10-14 11:33:09.636 testFCMIonic[24006:726909] stringByEvaluatingJavaScriptFromString FCMPlugin.onNotificationReceived({\"body\":\"bodyssdf\",\"collapse_key\":\"com.ionicframework.testfcmionic490110\",\"title\":\"test\",\"wasTapped\":false,\"notification\":{\"sound2\":\"default\",\"badge\":\"0\",\"title\":\"test\",\"sound\":\"default\",\"e\":\"1\",\"body\":\"bodyssdf\",\"icon\":\"fcm_push_icon\",\"click_action\":\"FCM_PLUGIN_ACTIVITY\"},\"from\":\"\\/topics\\/all\"});\r\n2016-10-14 11:33:24.025 testFCMIonic[24006:726909] app entered background\r\n2016-10-14 11:33:24.027 testFCMIonic[24006:726909] Set state background\r\n2016-10-14 11:33:24.028 testFCMIonic[24006:726909] Disconnected from FCM\r\n"}}
{"actor":{"display_login":"BananZGan"}}