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

Commit 933a121

Browse files
moved the Android desc to the Android chapter
1 parent 27dd6ac commit 933a121

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/MESSAGING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,7 @@ Although using push messages in your Firebase app is really easy setting it up i
1010
### Android
1111
If you didn't choose this feature during installation you can uncomment `firebase-messaging` in [include.gradle](../platforms/android/include.gradle)
1212

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.
2714

2815
Add the following services in the `app/App_Resources/Android/AndroidManifest.xml` to enable advanced FCM messaging:
2916
```
@@ -44,6 +31,19 @@ Add the following services in the `app/App_Resources/Android/AndroidManifest.xml
4431
</manifest>
4532
```
4633

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+
4747
#### Provisioning hell
4848
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.
4949

0 commit comments

Comments
 (0)