-
Notifications
You must be signed in to change notification settings - Fork 106
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
chore(website): Update Orbit deep link route #548
Conversation
website/src/client/utils/orbit.ts
Outdated
@@ -66,14 +66,15 @@ export function useOrbit() { | |||
return; | |||
} | |||
|
|||
const deeplink = `expo-orbit://snack/${experienceURL.replace('exp://', '')}`; |
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.
I think this might actually break the URL spec. What you'll get is something like this:
expo-orbit://snack/u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ...
I don't think the u.expo.dev
is allowed as path name characters.
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.
A good example here is Cloudflare, no idea wtf is going on here but it seems I broke their implementation of matching CNAME
records with this type of URL https://expo-snack.app/u.expo.dev/xxx?snack=yyy
And even the actual URL breaks due to some SSL cypher issues https://xxx.50.expo-snack.app/u.expo.dev/xxx?snack=yyy
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.
That being said, if it works 🤷
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.
Ohh I see, we should probably try to stay in the URL spec. What if we used expo-orbit://snack/?url=exp://u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ...
instead?
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.
I've updated this PR and Orbit to support the following format expo-orbit://snack/?url=exp://u.expo.dev/XXX?snack=YYY&snack-channel=ZZZ
Why
With the new
experienceURL
format Orbit can no longer distinguish an Expo Update from an Snack just by checking the URL, because of that we should use the/snack
route which is specific for snacksCloses ENG-11059
How
Update Orbit deep link route to use
/snack
Test Plan
Run snack locally and launch Orbit from the button
Screen.Recording.2024-01-26.at.11.34.46.mov