{"action":"created","issue":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/565","repository_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase","labels_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/565/labels{/name}","comments_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/565/comments","events_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/565/events","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/565","id":280186941,"number":565,"title":"No background notifications on IOS // Version 5.0.2","user":{"login":"Lacos247","id":29884363,"avatar_url":"https://avatars0.githubusercontent.com/u/29884363?v=4","gravatar_id":"","url":"https://api.github.com/users/Lacos247","html_url":"https://github.com/Lacos247","followers_url":"https://api.github.com/users/Lacos247/followers","following_url":"https://api.github.com/users/Lacos247/following{/other_user}","gists_url":"https://api.github.com/users/Lacos247/gists{/gist_id}","starred_url":"https://api.github.com/users/Lacos247/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lacos247/subscriptions","organizations_url":"https://api.github.com/users/Lacos247/orgs","repos_url":"https://api.github.com/users/Lacos247/repos","events_url":"https://api.github.com/users/Lacos247/events{/privacy}","received_events_url":"https://api.github.com/users/Lacos247/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":31,"created_at":"2017-12-07T16:10:47Z","updated_at":"2018-02-03T14:35:57Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nso far everything works fine but I don't get background notifications on ios.\r\nIf I start the app - the notifications are delivered and shown with the local notifications plugin.\r\nRemote Notifications are activated in the apropriate Xcode Project (and \"UIBackgroundModes\" in Info.plist , too).\r\n\r\nIn main.ts (before bootstrap) I have the following code. \r\nMy expectation is that the local notification is shown even if the app is in the background. \r\nWhat I am missing? Any help would be appreciated!!!\r\n\r\n`firebase.init({\r\n    // Optionally pass in properties for database, authentication and cloud messaging,\r\n    // see their respective docs and 'iOSEmulatorFlush' to flush token before init.\r\n    iOSEmulatorFlush: true,\r\n    onPushTokenReceivedCallback: function(token) {\r\n        console.log(\"Firebase push token: \" + token);\r\n    },\r\n    onMessageReceivedCallback: function(message) {\r\n        console.log(\"scheduling test notification..\");\r\n        LocalNotifications.schedule([{\r\n            id: 1,\r\n            title: 'New Local Test Title',\r\n            body: 'New Local Test message',\r\n            ticker: 'The ticker',\r\n            badge: 5,\r\n            groupedMessages:[\"The first\", \"Second\", \"Keep going\", \"one more..\", \"OK Stop\"], //android only\r\n            groupSummary:\"Summary of the grouped messages above\", //android only\r\n            ongoing: true, // makes the notification ongoing (Android only)\r\n            smallIcon: 'res://heart',\r\n            sound: \"customsound-ios.wav\", // falls back to the default sound on Android\r\n            at: new Date(new Date().getTime() + (1 * 1000)) // 10 seconds from now\r\n        }]).then(\r\n            function() {\r\n                console.log(\"Notification scheduled\");\r\n            },\r\n            function(error) {\r\n                console.log(\"scheduling error: \" + error);\r\n            }\r\n        );\r\n    }\r\n}).then(\r\n    (instance) => {\r\n        console.log(\"firebase.init done\");\r\n    },\r\n    (error) => {\r\n        console.log(\"firebase.init error: \" + error);\r\n    }\r\n);` "},"comment":{"url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/comments/362814817","html_url":"https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/565#issuecomment-362814817","issue_url":"https://api.github.com/repos/EddyVerbruggen/nativescript-plugin-firebase/issues/565","id":362814817,"user":{"login":"indianazhao","id":4360033,"avatar_url":"https://avatars2.githubusercontent.com/u/4360033?v=4","gravatar_id":"","url":"https://api.github.com/users/indianazhao","html_url":"https://github.com/indianazhao","followers_url":"https://api.github.com/users/indianazhao/followers","following_url":"https://api.github.com/users/indianazhao/following{/other_user}","gists_url":"https://api.github.com/users/indianazhao/gists{/gist_id}","starred_url":"https://api.github.com/users/indianazhao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indianazhao/subscriptions","organizations_url":"https://api.github.com/users/indianazhao/orgs","repos_url":"https://api.github.com/users/indianazhao/repos","events_url":"https://api.github.com/users/indianazhao/events{/privacy}","received_events_url":"https://api.github.com/users/indianazhao/received_events","type":"User","site_admin":false},"created_at":"2018-02-03T14:35:57Z","updated_at":"2018-02-03T14:35:57Z","author_association":"NONE","body":"@p-3 I've tested your example project with my settings. The following `git status` shows what files I've updated.\r\n\r\n```\r\nChanges not staged for commit:\r\n  (use \"git add/rm <file>...\" to update what will be committed)\r\n  (use \"git checkout -- <file>...\" to discard changes in working directory)\r\n\r\n        modified:   app/App_Resources/Android/google-services.json\r\n        modified:   app/App_Resources/iOS/GoogleService-Info.plist\r\n        modified:   app/App_Resources/iOS/build.xcconfig\r\n        deleted:    app/App_Resources/iOS/dialogapp.entitlements\r\n        modified:   package.json\r\n\r\nUntracked files:\r\n  (use \"git add <file>...\" to include in what will be committed)\r\n\r\n        app/App_Resources/iOS/MediQNative2.entitlements\r\n```\r\n\r\nBut I still get only the push notification when the app is in foreground. I made a video record for this behavior.\r\nhttps://www.youtube.com/watch?v=CEXevRdDuC8\r\n\r\nCan you please point out what little thing @EddyVerbruggen fixed or any other advice? Thank you."}}
{"actor":{"display_login":"indianazhao"}}