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

How to use this plugin for silent notifications for iOS? #61

Closed
jack24254029 opened this issue Jun 11, 2021 · 3 comments
Closed

How to use this plugin for silent notifications for iOS? #61

jack24254029 opened this issue Jun 11, 2021 · 3 comments

Comments

@jack24254029
Copy link

Can the plugin use for silent notifications on iOS?

@jack24254029
Copy link
Author

jack24254029 commented Jun 21, 2021

I set the content-available is 1 in apns json object and it is work and trigger onResume when the app is inactive state, but it is not work when the app is terminated or suspended state.

BTW, I set the content-available is 1 in apns json object it will trigger onMessage twice when the app is active state.

@ben-xD
Copy link

ben-xD commented Aug 17, 2021

Although PushConnector#configure takes a onBackgroundMessage, this is currently not implemented anywhere. You'd have to look at flutter_apns_only package which is also in this repo, where eventually onBackgroundMessage is not being used:

void configureApns({
ApnsMessageHandler? onMessage,
ApnsMessageHandler? onLaunch,
ApnsMessageHandler? onResume,
ApnsMessageHandler? onBackgroundMessage,
}) {
_onMessage = onMessage;
_onLaunch = onLaunch;
_onResume = onResume;
_channel.setMethodCallHandler(_handleMethod);
_channel.invokeMethod('configure');
}

@christofkost
Copy link
Contributor

There is no functionality for background push notifications (a.k.a. silent notifications), yet.
Pull requests are always welcome since the original developer is not active on this package anymore.

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

No branches or pull requests

3 participants