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
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -175,7 +175,7 @@ curl -X POST --header "Authorization: key=SERVER_KEY" --Header "Content-Type: ap
175
175
176
176
<imgsrc="images/push-server-key.png"width="459px"height="220px"alt="Push server key"/>
177
177
178
-
> Note that 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.
178
+
> Note that if you don't want a badge on the app icon, remove the `badge` property or set it to 0.
179
179
180
180
### Notfication-popup example
181
181
@@ -303,6 +303,15 @@ Add the `showWhenInForeground` flag to your payload:
303
303
}
304
304
```
305
305
306
+
### (iOS) Disable automatic clearing the badge
307
+
Currently by default, when launching the app, badge is cleared. You can disable the feature by passing a flag in your init option.
308
+
309
+
```js
310
+
firebase.init({
311
+
autoClearBadge:false
312
+
});
313
+
```
314
+
306
315
## What if iOS doesn't show/receive notifications in the background?
307
316
Make sure you [`require` the plugin in `app.ts` / `main.ts` / `main.aot.ts`](https://github.com/EddyVerbruggen/nativescript-plugin-firebase/blob/55cfb4f69cf8939f9101712fed22383196b08d36/demo/app/app.ts#L5)
308
317
*before*`application.start()`, and do `init()`*after* the app has started (not in `app.ts` - not even in a timeout; move it out of `app.ts` entirely!).
0 commit comments