aduros / flambe

Rapidly cook up games for HTML5, Flash, Android, and iOS.
https://github.com/aduros/flambe/wiki
MIT License
745 stars 118 forks source link

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

Open BBaysinger opened 9 years ago

BBaysinger commented 9 years ago

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 commented 9 years ago

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.

markknol commented 9 years ago

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

BBaysinger commented 9 years ago

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

markknol commented 9 years ago

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?

BBaysinger commented 9 years ago

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.