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

[firebase_messaging] check permissions #20

Conversation

wwwdata
Copy link

@wwwdata wwwdata commented Aug 23, 2019

Description

This change introduces a method call for iOS to check whether the user has previously accepted or declined the push notification setting. This is useful to check it later in the app and then remind the user to enable the push notifications manually in the control center, because the initial request permissions dialog is only displayed once. Or if the user changed the permissions in the Settings, and switches back to the app, the onIosSettingsRegistered event is also not fired.

Related Issues

I stuck to the old API, if flutter/plugins#1009 is merged in, this should also be updated to use the new UNUserNotificationCenter

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
  • I updated CHANGELOG.md to add a description of the change.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@wwwdata wwwdata changed the title Firebase messaging check permissions [firebase_messaging] check permissions Aug 23, 2019
@genert
Copy link

genert commented Aug 27, 2019

This PR has conflicts against master branch, please resolve them first.

@wwwdata wwwdata force-pushed the firebase-messaging-check-permissions branch from 7474c42 to b86dd77 Compare August 28, 2019 07:29
@genert
Copy link

genert commented Aug 29, 2019

Ping @collinjackson @kroikie

@kroikie
Copy link
Collaborator

kroikie commented Nov 15, 2019

@wwwdata Many thanks for this PR. We try to keep the API as close to the native SDKs as possible. I think this is indeed a useful feature but I don't think it is something that should be part of the FCM plugin. I think the Flutter framework would be a better fit for a system specific API like this one.

@Saraalr Saraalr mentioned this pull request Jun 26, 2020
@firebase firebase locked and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants