I am trying to detect native apps that is not implemented by me on my web page and there is a solution to Safari Mobile. The solution mentioned two methods
-
Detect appInstalled cookie: My web page cannot assume every app placed an appInstalled cookie when their app is installed or after users erased history; therefore, my web page cannot use this method.
-
Use javascript setTimeout to display a fallback page when it can actually timeout without going to the native app. This works perfectly on Safari; however, Chrome will ignore the timeout and display page not found for un-handled custom scheme(i.e. app not installed)
Is there a way to detect native app installed on iOS Chrome?
Answer to this question:
How can I open app url with fallback from Chrome for iOS
Based on the above answer from ajwillia.ms in the link above, here is the function to display fallback page while trying to ope native app from Chrome for iOS.