-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Describe the bug
notification appears even in foreground mode.
Expected behavior
when in foreground mode, I want notification not to appear.
Plugin Version
Run cordova plugin list to find out what version of cordova-plugin-firebase you are running with
2.0.1
Desktop (please complete the following information):
- OS: [e.g. iOS] Mac OS
- Browser [e.g. chrome, safari] safari
Smartphone (please complete the following information):
- Device: [e.g. iPhone6] iPhone6
- OS: [e.g. iOS8.1] 11.0.0
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
I tried to modify UNNotificationPresentationOptionAlert to UNNotificationPresentationOptionNone in the nodemodules/cordova-plugin-firebase/src/ios/AppleDelegate+FirebasePlugin.m.
But It can't solve my problem.
And I tried to install firebase plugin using following code.
cordova plugin add cordova-plugin-firebase --variable IOS_HIDE_FOREGROUND_NOTIFICATION ="false"
But I just got following error.
laychar-ui-Mac-mini:test1 lay$ sudo cordova plugin add cordova-plugin-firebase --variable IOS_HIDE_FOREGROUND_NOTIFICATION ="false"
(node:769) UnhandledPromiseRejectionWarning: CordovaError: invalid variable format: IOS_HIDE_FOREGROUND_NOTIFICATION
at /usr/local/lib/node_modules/cordova/src/cli.js:435:27
at Array.forEach ()
at cli (/usr/local/lib/node_modules/cordova/src/cli.js:431:27)
at /usr/local/lib/node_modules/cordova/src/cli.js:203:16
at
at process._tickCallback (internal/process/next_tick.js:188:7)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
(node:769) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:769) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.