|
|
|
|
|
by daegloe
4770 days ago
|
|
Instead, you can redirect to a web page with an iOS Smart Banner at the top. If the app is installed, the user must tap the open button. If the app is not installed, the user can tap the install button and the app will then install and open to the same designated in-app URL. An alternative hacky method to avoid the web page is to redirect the browser to a JavaScript URL. However, this results in a momentary error popup, though it's automatically dismissed. And the user is still navigated to the backup URL when Safari returns to the foreground in the future. For example: javascript:window.location = 'app-schema://'; window.setTimeout(function() { window.location = 'http://app-url; }, 10); EDIT: After thinking about it, since timers are suspended when Safari enters the background, you can probably use setInterval and check how long it's been to decide whether the browser should navigate to the backup URL. The error popup remains a problem, however. |
|