Covid-Self-report-Tool / cov-self-report-frontend

Frontend repository for COVID-19 self-reporting tool in React
https://www.covidselfreport.org
MIT License
10 stars 1 forks source link

Force URL to open in actual browser #70

Open abettermap opened 4 years ago

abettermap commented 4 years ago

Originally posted by @abettermap in https://github.com/Covid-Self-report-Tool/cov-self-report-frontend/pull/33#issuecomment-628309533

Description

iOS FB apps do not let you set your default means of opening web links. There may be a way to force it using a custom protocol.

Some links/resources

Behavior of other apps

On my iPhone in the Gmail app (or even just Messages) if I click a link to a site that has a corresponding app on my phone such as Meetup using a regular url and scheme like http://meet.meetup.com/ls/click?upn=BIG_LONG_STRING, it opens in the Meetup app (Slack links open in Slack, etc.).

I recall having responded to a prompt at some point to allow this behavior, but I don't see anywhere to un-set it. Not in Gmail, Meetup, or iOS settings. Sooo where is the setting in case I change my mind on the behavior? No idea, couldn't find it.

So that means I can just paste a Meetup link in the FB Messenger app and it will open in the Meetup app, right? Nope. Which makes me think that there is something garbage-y going on inside the FB pseudo-browser. If Meetup links open in the Meetup app for all apps I tested except FB, I'll point the finger at FB.

Using a custom protocol

What makes me think that the "Open in Instagram app" behavior that Sumit mentioned (which does work within the FB Messenger app btw), is either A) some FB sorcery unique to IG since FB owns them, or B) the custom protocol does work.

However, if it's B then I'm not able to make it happen. The changes I pushed (AWS deploy not working btw, I had to manually deploy here) error out in FB Messenger app (open the symptoms form to trigger it). It's definitely possible I did something incorrectly so feel free to modify, but it's super hard to test because the domain has to match the url set in the custom protocol so localhost does not seem to be an option. Not having the AWS Preview for PRs makes several extra steps as well. 😠

Thoughts????

abettermap commented 4 years ago

Attempts can be found in the diffs here: https://github.com/Covid-Self-report-Tool/cov-self-report-frontend/pull/33/files.