flambe icon indicating copy to clipboard operation
flambe copied to clipboard

Linking to iTunes store urls using System.web.openBrowser() freezes iOS Safari.

Open BBaysinger opened this issue 9 years ago • 5 comments

Safari (iOS 8.2 and 8.3) is frozen entirely when returning from the App Store app. The browser has to be restarted to recover. Safari automatically opens itunes.apple.com URLs in the App Store, so there doesn't appear to be an alternative way to present this content... Unless we introduce an additional html page with a redirect or something. I will need to explore that option, as this is a client requested feature for our project.

BBaysinger avatar May 15 '15 19:05 BBaysinger

So, linking to a page with a js redirect (location.replace) does nothing, but it works if you put the redirect in a setTimeout call. And actually, upon to returning to Safari, the redirect page is gone, and you're back in your Flambe app. This is actually a great workaround.

BBaysinger avatar May 15 '15 20:05 BBaysinger

This is not an answer to your question directly but are you linking to a http:// url or to itms://? This could avoid the Safari open. See http://stackoverflow.com/a/2337601/508029

markknol avatar May 15 '15 20:05 markknol

I tried itms://, itms-apps://, http://, and https://. All of them froze the browser solid.

BBaysinger avatar May 15 '15 21:05 BBaysinger

Did you also try to host an own page that redirects to the iTunes page (for example after 3 seconds) and link from flambe to that page?

It almost doesn't seem to be related to Flambe? Did you also test on another iOS device?

markknol avatar May 15 '15 21:05 markknol

As I said, it does work if you link to a secondary page, and have location.replace within a setTimeout call. It even works if you pass 0 milliseconds. It may not be related to Flambe, but interesting that it works from straight JS, but not from Flambe. I did test on other devices.

BBaysinger avatar May 15 '15 21:05 BBaysinger