Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit 5dfe32b

Browse files
iOS: Push Notifications not working in Background in Production #264
iOS Notification not received in background mode #258 iOS: Push Notifications not working in Background or when application is reopened #243 Notification message not shown when app is in the background #237
1 parent c9d571f commit 5dfe32b

File tree

8 files changed

+126
-4025
lines changed

8 files changed

+126
-4025
lines changed

docs/MESSAGING.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,28 @@ If you didn't choose this feature during installation you can run the "post inst
3636

3737
#### Enable push support in Xcode
3838

39-
Open your project's target and head over to "Capabilities" to toggle this switch:
39+
Open /platforms/ios/yourproject.__xcworkspace__ (!) and go to your project's target and head over to "Capabilities" to toggle this switch:
4040
<img src="images/push-xcode-config.png" width="600px" alt="Push Xcode config"/>
4141

4242
> Without this enabled you will receive push messages in the foreground, but **NOT in the background** / when the app is killed.
4343
44+
##### copy the entitlements file
45+
The previous step created a the file`platforms/ios/YourAppName/Resources/YourAppName.entitlements`.
46+
Copy that file to `app/App_Resources/iOS/` (if it doesn't exist yet, otherwise merge its contents),
47+
so it's not removed when you remove and re-add the iOS platform. The relevant content for background push in that file is:
48+
49+
```xml
50+
<key>aps-environment</key>
51+
<string>development</string>
52+
```
53+
4454
#### Receiving remote notifications in the background
4555
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:
4656

4757
```xml
4858
<key>UIBackgroundModes</key>
4959
<array>
50-
<string>remote-notification</string>
60+
<string>remote-notification</string>
5161
</array>
5262
```
5363

firebase.ios.js

Lines changed: 112 additions & 138 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "3.9.1",
3+
"version": "3.9.2",
44
"description": "Fire. Base. Firebase!",
55
"main": "firebase",
66
"typings": "index.d.ts",
@@ -11,7 +11,7 @@
1111
}
1212
},
1313
"scripts": {
14-
"bundle-installer": "npm install --ignore-scripts && webpack --config scripts/webpack.config.js scripts/installer.js scripts/postinstall.js && webpack --config scripts/webpack.config.js scripts/install_ios_entitlements.js scripts/install_ios_entitlements_packed.js",
14+
"bundle-installer": "npm install --ignore-scripts && webpack --config scripts/webpack.config.js scripts/installer.js scripts/postinstall.js",
1515
"prepublish": "npm run bundle-installer",
1616
"postinstall": "node scripts/postinstall.js",
1717
"config": "node scripts/postinstall.js config"

scripts/install_ios_entitlements.js

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)