Detect if iOS is using webapp

后端 未结 2 1263
醉酒成梦
醉酒成梦 2021-02-07 07:06

I was wondering if it\'s possible to detect if an iOS user is using the webapp, or just visiting the normal way with safari browser.

The reason I want to achieve is tha

2条回答
  •  余生分开走
    2021-02-07 07:29

    You have to detect this by using some javascript:

    
     
    

    Now the extra check "standalone" in window.navigator is needed because some browsers do not have the standalone property and you don't want your code to crash for those browsers.

提交回复
热议问题