-
Notifications
You must be signed in to change notification settings - Fork 1
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
don't merge this #33
Conversation
navigator.registerProtocolHandler( | ||
'web+safarita', | ||
'https://pr-33.d3pqoo7mq9yhwf.amplifyapp.com/?src=%s', | ||
'Safari' | ||
); |
There was a problem hiding this comment.
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:
- The
scheme
to use. I think custom web-based ones have to be prefixed withweb+
- The
url
that will be used when anhref
is set to thescheme
. 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 theSTUFF
part of<a href="web+safarita:STUFF">
will be applied to the%
. Not sure it's useful to us but it is required.
- 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.
@ajsamra here's what I found. Some links/resourcesBehavior of other appsOn 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 protocolWhat 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???? |
Closing. Created an issue in case anyone wants to pursue that approach. Might be a lost cause though... |
just need the deploy...