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

Commit 8061544

Browse files
Another note about iOS background notifications
1 parent 55cfb4f commit 8061544

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/MESSAGING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,3 +181,9 @@ curl -X POST --header "Authorization: key=AAAA9SHtZvM:APA91bGoY0H2nS8GlzzypDXSiU
181181
If you don't want a badge on the app icon, remove the `badge` property or set it to 0. Note that launching the app clears the badge anyway.
182182

183183
<img src="images/push-server-key.png" width="459px" height="220px" alt="Push server key"/>
184+
185+
## What if iOS doesn't receive notifications in the background?
186+
Make sure you [`require` the plugin in `app.ts`](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/55cfb4f69cf8939f9101712fed22383196b08d36/demo/app/app.ts#L5)
187+
*before* `application.start()`, and do `init()` *after* the app has started (not in `app.ts`).
188+
189+
> Make sure to use `require`, *not* `import` in `app.ts` because TSC will remove the import in case you're not using it.

0 commit comments

Comments
 (0)