-
Notifications
You must be signed in to change notification settings - Fork 1.6k
ios) notification appears even in foreground mode. #873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Duplicate of #817 |
@laychar, it is not implemented yet. There is a pull request that implements the functionality but requires modifications last time I checked. There are less than 5 PRs so it should be easy to find. Follow the PR so you know what changes to make when it's merged. |
Sorry, What do you mean? - it is not implemented yet. |
Thanks for your advice. But I still don't know what should I do to remove notification in foreground. |
What file and what part I should modify or add? |
Check the file modifications in the PR. That shows you which line to modify in which file. |
It works Thank you! |
Sorry, I did mistake. I didn't call getToken. |
following is file which I modified. |
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 with2.0.1
Desktop (please complete the following information):
Smartphone (please complete the following information):
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.
The text was updated successfully, but these errors were encountered: