Hacker Newsnew | comments | show | ask | jobs | submitlogin

Mobile Safari does support apps registering custom URL handlers, so google could rewrite the links as gplus:// and they could open in the G+ app. Unfortunately I don't think this behaves nicely if you don't have the content handling app installed since it just errors.



That's correct. If you don't have the app in question installed, you get a nasty "Page could not be found" error. There are hacky and unstable JS tricks you can pull with setTimeout to send the user to the app store if they don't have the app installed, but I haven't heard of any reliable way to deal with this (pretty glaring) failure case.

Even just the ability to suppress the error message would be more or less fine.

-----


How about loading the gplus:// link in a hidden iframe. Then continue to load the page in the browser. If they have the app installed, it will redirect, otherwise the page will just load in the browser.

-----


I'm fairly sure when I tried something like that it popped up a "Page not found" dialog. I may have been doing it wrong though.

-----


But then you have an extraneous page loaded.

-----


So just load up the page (on iOS user-agents) with a big red button up top which allows the user to self-redirect, or default a preference on the G+ profile (if they're logged in).

-----




Applications are open for YC Summer 2015

Guidelines | FAQ | Support | Lists | Bookmarklet | DMCA | Y Combinator | Apply | Contact

Search: