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

PWA #105

Closed
tanjunior opened this issue Apr 12, 2023 · 4 comments
Closed

PWA #105

tanjunior opened this issue Apr 12, 2023 · 4 comments

Comments

@tanjunior
Copy link

Apple has now supported badging API along with Push API https://developer.apple.com/documentation/safari-release-notes/safari-16_4-release-notes#Web-Apps

Though my attempts on implementing it on flutter PWA has failed. And strangely the same PWA running in chrome on android gets badge without even a line of badging API code.

I am wondering has anyone gotten badge working on iOS PWA?

@tanjunior tanjunior changed the title WPA PWA Apr 12, 2023
@tomayac
Copy link

tomayac commented Apr 12, 2023

iOS requires you to obtain the notifications permission. This is mentioned in the spec. Does this help?

@tanjunior
Copy link
Author

iOS requires you to obtain the notifications permission. This is mentioned in the spec. Does this help?

I already had permissions going using Notification.requestPermission() I am able to receive notifications so my permissions are already granted.

Should I be using WorkerNavigator instead?

@tanjunior
Copy link
Author

tanjunior commented Apr 12, 2023

I figured out what's wrong. Seems like on iOS you can't do flag mode on setAppBadge(). I have been testing it that way so it made it seems like badge is not showing.

@tomayac
Copy link

tomayac commented Apr 13, 2023

Thanks for sharing what was going on. Turns out that you ran into #102. Closing the present Issue in favor of that.

@tomayac tomayac closed this as completed Apr 13, 2023
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

2 participants