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

Commit d958a0d

Browse files
Merge pull request #1437 from sbatson5/couple-of-notes-on-messaging
[DOC] - add a couple of notes to messaging
2 parents d8973d0 + 784835c commit d958a0d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/MESSAGING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ so it's not removed when you remove and re-add the iOS platform. The relevant co
4343

4444
> Note that since plugin version 5.1.8 the name of the file can either be `<YourAppName>.entitlements` or `app.entitlements`. `YourAppName` is the iOS folder name, see the path above.
4545
46+
> Note that when shipping to the iOS App Store or Google Play, the entitlements file needs to be updated to reflect production:
47+
48+
```xml
49+
<key>aps-environment</key>
50+
<string>production</string>
51+
```
52+
4653
#### Allow processing when a background push is received
4754
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:
4855

@@ -60,6 +67,7 @@ Follow [this guide](https://firebase.google.com/docs/cloud-messaging/ios/certs)
6067
To listen to received notifications while in the foreground or when your app moves from the background to the foreground, add a handler to `init`.
6168

6269
Any pending notifications (while your app was not in the foreground) will trigger the `onMessageReceivedCallback` handler.
70+
`onMessageReceivedCallback` is *required* for push notifications to be enabled (even if the function is empty). Users will not be prompted to allow to push notifications without it.
6371

6472
##### JavaScript
6573
```js
@@ -128,6 +136,7 @@ behaviour and handle the notifications yourself on the `onMessageReceivedCallbac
128136

129137
```js
130138
firebase.init({
139+
// ..
131140
showNotifications: false,
132141
});
133142
```
@@ -144,6 +153,7 @@ parameters/data when sending the push notification, you need to set the `showNot
144153

145154
```js
146155
firebase.init({
156+
// ..
147157
showNotificationsWhenInForeground: true,
148158
});
149159
```

0 commit comments

Comments
 (0)