-
Notifications
You must be signed in to change notification settings - Fork 280
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
Confusing use of leading slash to define routes #101
Comments
Hi @mixedrice We made this decision because iOS apps don't have a unique host and it would be unclear how to register a route for "my-app://say/someTitle/someMessage" vs a route for "my-app://mycompany.com/say/someTitle/someMessage". The decision is based on Apple's docs on NSURL and the URI RFC
It is covered in the README but perhaps we could move this up a bit and reference it more. Thanks for the feedback! |
Yeah, fair enough... perfectly reasonable implementation, and does offer flexibility/consistency with the host-name pattern. I think for me, I'm still drawn towards optimizing for the use case (and I could be presumptuous here) of most folks leveraging custom URLs in native apps as simple command relays and lightweight routes (and ignoring the host component)... the temptation, right or wrong, is to overload the host with what normally be the first component of a path in traditional URLs. I think annotating the code examples with working URL's would totally get the job done. Appreciate the help! |
Annotation SGTM. Hopefully with Universal Links, scheme based is less and less common and host will always be there :D |
I'd be surprised if this wasn't a common point of confusion... when looking at the sample project, and code such as:
Most will presume this translates to an URL such as
my-app://say/someTitle/someMessage
... but in reality you must register the route without the leading slashI'd propose making examples and README more explicit by showing corresponding external URL for each and every registration example, including, perhaps, comments in the sample source itself.
The text was updated successfully, but these errors were encountered: