how to prevent iOS safari alert when trying to open non-installed native app?

后端 未结 6 1948
你的背包
你的背包 2020-12-04 09:11

I\'ve been looking for a way to open a native iOS app from the browser. I found a decent solution here: Is it possible to register a http+domain-based URL Scheme for iPhone

6条回答
  •  囚心锁ツ
    2020-12-04 09:36

    For me this does the job:

    window.open(appLink, '_system')`
    
    window.open(appstoreLink, '_system')
    

    Works for android and ios. If the first one can't be opened the second one is called without alert or something. Otherwise it just opens the app.

提交回复
热议问题