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
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,20 +10,7 @@ Although using push messages in your Firebase app is really easy setting it up i
10
10
### Android
11
11
If you didn't choose this feature during installation you can uncomment `firebase-messaging` in [include.gradle](../platforms/android/include.gradle)
12
12
13
-
### iOS
14
-
If you didn't choose this feature during installation you can uncomment `Firebase/Messaging` in [Podfile](../platforms/ios/Podfile)
15
-
16
-
#### Receiving remote notifications in the background
17
-
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:
18
-
19
-
```xml
20
-
<key>UIBackgroundModes</key>
21
-
<array>
22
-
<string>remote-notification</string>
23
-
</array>
24
-
```
25
-
26
-
For Android you will not get the title and body if the notification was received while the application was in the background, but you will get the *data* payload.
13
+
You will not get the title and body if the notification was received while the application was in the background, but you will get the *data* payload.
27
14
28
15
Add the following services in the `app/App_Resources/Android/AndroidManifest.xml` to enable advanced FCM messaging:
29
16
```
@@ -44,6 +31,19 @@ Add the following services in the `app/App_Resources/Android/AndroidManifest.xml
44
31
</manifest>
45
32
```
46
33
34
+
### iOS
35
+
If you didn't choose this feature during installation you can uncomment `Firebase/Messaging` in [Podfile](../platforms/ios/Podfile)
36
+
37
+
#### Receiving remote notifications in the background
38
+
Open `app/App_Resources/iOS/Info.plist` and add this to the bottom:
39
+
40
+
```xml
41
+
<key>UIBackgroundModes</key>
42
+
<array>
43
+
<string>remote-notification</string>
44
+
</array>
45
+
```
46
+
47
47
#### Provisioning hell
48
48
Follow [this guide](https://firebase.google.com/docs/cloud-messaging/ios/certs) to the letter. Once you've done it run `tns run ios` and upon starting the app it should prompt you for notification support. That also works on the simulator, but actually receiving notifications is _only_ possible on a real device.
0 commit comments