You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/MESSAGING.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,6 +43,13 @@ so it's not removed when you remove and re-add the iOS platform. The relevant co
43
43
44
44
> 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.
45
45
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
+
46
53
#### Allow processing when a background push is received
47
54
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:
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`.
61
68
62
69
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.
63
71
64
72
##### JavaScript
65
73
```js
@@ -128,6 +136,7 @@ behaviour and handle the notifications yourself on the `onMessageReceivedCallbac
128
136
129
137
```js
130
138
firebase.init({
139
+
// ..
131
140
showNotifications:false,
132
141
});
133
142
```
@@ -144,6 +153,7 @@ parameters/data when sending the push notification, you need to set the `showNot
0 commit comments