Skip to content
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

Improved iOS compatibility for pre-10.0 background notification #255

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ferdil
Copy link

@ferdil ferdil commented Feb 22, 2017

Removed the conditional exclusion of the didReceiveRemoteNotification methods required for support of pre iOS10 versions

Removed the conditional exclusion of the didReceiveRemoteNotification methods required for support of pre iOS10 versions
@ferdil ferdil changed the title Update AppDelegate+FCMPlugin.m Improved iOS compatibility for pre-10.0 background notification Mar 6, 2017
@ferdil
Copy link
Author

ferdil commented Mar 6, 2017

After a bit more research, I'm of the opinion that the section for iOS 10 should be omitted because iOS 10 still handles the "old" notification mechanism. The new UserNotifications framework replaces this, but still works fine in iOS 10, 9, 8 etc.
My suggestion is to remove the code for the userNotificationCenter because if this is in, the message gets delivered twice (once in didReceiveRemoteNotification and once in willPresentNotification)
My code works for iOS 10, 9 and lower, provided the UserNotification callbacks are removed.

@rehanhanar7
Copy link

Ferdil when we run the app with this update code. It crashes

@ferdil
Copy link
Author

ferdil commented Mar 10, 2017

Do you have any log output you can share ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants