Javascript determines whether to install the app through the url scheme.
怪我咯
怪我咯 2017-05-19 10:40:29
0
1
477

I have encountered a problem and I haven’t found a good solution. Does anyone know how to solve it and save me quickly?
JS opens the app through url scheme
In the past, if the scheme could open the app in Safari, the app would be opened directly. If there is no such scheme, it will Continuous request
I can set a setTimeout and perform other operations if there is no response within the specified time
But now Safari will respond very quickly. If the protocol is blocked, it will prompt that Safari cannot open the webpage because the URL is invalid. If The meeting prompts whether to open the corresponding app
So I can’t judge whether the app has been installed through timeout
How can I judge?
Does anyone know how to break it? thanks, thanks! ! !
The method found by the search engine is similar to what I used before
Now our app is not online, and the corresponding installation packages downloaded are all on the server, so it is a bit painful.
If the app is available on applestore or app store, it can be opened directly through applestore or app store.
I have seen some sharing pages that other people used to open the app directly. Now they are basically opened through the app store, or the two actions of downloading and opening the app are made into independent buttons.

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
Ty80

You can use the src of the iframe to send the scheme. If the iframe has content after a while, it means you have entered the Safari error page. If not, it means the scheme has been opened

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template