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

don't merge this #33

Closed
wants to merge 3 commits into from
Closed

don't merge this #33

wants to merge 3 commits into from

Conversation

abettermap
Copy link
Contributor

just need the deploy...

Comment on lines +22 to +26
navigator.registerProtocolHandler(
'web+safarita',
'https://pr-33.d3pqoo7mq9yhwf.amplifyapp.com/?src=%s',
'Safari'
);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajsamra this is how to use registerProtocolHandler. See my links in main PR thread, but basically the params are:

  1. The scheme to use. I think custom web-based ones have to be prefixed with web+
  2. The url that will be used when an href is set to the scheme. I found mixed instructions but most say:
    • The URL must be same (or same domain at least) as the one it's being called from
    • ...and should be https (definitely mixed on this)
    • The %s is required. Whatever goes into the STUFF part of <a href="web+safarita:STUFF"> will be applied to the %. Not sure it's useful to us but it is required.
  3. The app to open it in (???). I'm not sure if it's Google or Chrome, or if this is even the way to do it in the first place.

@abettermap
Copy link
Contributor Author

@ajsamra here's what I found.

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
Copy link
Contributor Author

Closing. Created an issue in case anyone wants to pursue that approach. Might be a lost cause though...

@abettermap abettermap closed this May 25, 2020
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

Successfully merging this pull request may close these issues.

1 participant