cyclestreets / ios

iPhone app
https://www.cyclestreets.net/mobile/iphone/
178 stars 149 forks source link

App needs to intercept requests to http://www.cyclestreets.net/ #94

Open mvl22 opened 8 years ago

mvl22 commented 8 years ago

Currently the app supports a custom namespace cyclestreets://... which is what it includes when launching a send-route-to-friend e-mail. However, this is not ideal, because:

a) It is useless if people don't have the app; and b) If people who do have the app follow a link in Safari to cyclestreets.net URLs they end up in the mobile web interface which clearly will never be as superior as the native app.

I've noticed that apps like Twitter, YouTube increasingly seem to have some kind of system-level registration which means that a request in Safari gets intercepted by that app and the content at the URL gets opened in that native app, which is naturally the superior experience.

If this is possible, we should enable it, and scrap the cyclestreets:// namespace.

If this is a new iOS9 feature, it is fine to remove this for iOS8<, as it's not particularly useful while the custom namespace is sent in an e-mail.

neilkachu commented 8 years ago

This is this urlscheme feature, twitter will have twitter:// registered on the system. This is an inherent issue when you have 2 interfaces to the same content. The best way round this is too look at the javascript based scripts available that will attempt to launch the app and if they fail re-direct users to the web interface. Then all cs share urls will point to this page, this is gist of it: http://stackoverflow.com/questions/13044805/how-to-check-if-an-app-is-installed-from-a-web-page-on-an-iphone

mvl22 commented 8 years ago

I believe this is now called "Universal Links" and apple seems to be removing support for URL Schemes.

https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html https://blog.branch.io/ios-9.2-redirection-update-uri-scheme-and-universal-links