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

iOS Chrome and Firefox display prompt #66

Open
DaveOrDead opened this issue Jan 6, 2021 · 5 comments
Open

iOS Chrome and Firefox display prompt #66

DaveOrDead opened this issue Jan 6, 2021 · 5 comments

Comments

@DaveOrDead
Copy link

Hey, great project, looks great on the devices I've tested it on.

I thought it was worth noting though that Apple only allows the "Add to Homescreen" feature when using Safari.

The prompt, however, displays on iOS Chrome and Firefox as well which could be confusing for a user as they won't be able to install the PWA without switching to Safari first.

A couple of options:

a) only show the prompt in Safari
b) add the ability to provide different copy depending on the browser

cheers

@chrisdancee
Copy link
Owner

Hi @DaveOrDead,

Not sure how I had never considered this. Nor any issues raised around this previously.
Thanks for the issue, I will get this updated asap.

@DaveOrDead
Copy link
Author

No worries :) I had a look into it myself and it doesn't seem there is a way to reliably and consistently detect iOS Safari, I always ended up with some false positives on Chrome.

The simplest / quickest solution (not the most glamorous) would be just to add a line above the direction steps saying something like:

Using Safari: 

1. Press the share button
2. Press the add to home screen button

If you do find a reliable iOS Safari detection method I'd be really interested to hear about it

@chrisdancee
Copy link
Owner

According to this doc: https://chromium.googlesource.com/chromium/src/+/master/docs/ios/user_agent.md
We could search for CriOS, and not show the prompt accordingly.
Will take look into it

@PegasisForever
Copy link

For firefox, we can search for FxiOS.
According to this https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent/Firefox#firefox_for_ios

@brianshano
Copy link

Is there a quick way to get the user to open the pwa in safari?
That would help, but it seems you have to copy the url, find safari & paste it in.
Having a menu item or button that opens the page in safari would make a better UX.

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

4 participants