How to open Safari from a WebApp in iOS 7

前端 未结 11 2137
情深已故
情深已故 2020-12-02 09:50
相关标签:
11条回答
  • 2020-12-02 10:30

    iOS v7.0.3 released 10/22/13 fixes the problem.

    0 讨论(0)
  • 2020-12-02 10:31

    Having an anchor tag with target _blankwill work in iOS 7.0.3 but using window.open will not work and will remain to open within the webview in 7.0.3:

    window.open('http://www.google.com/', '_blank');
    
    0 讨论(0)
  • 2020-12-02 10:37

    It looks suspiciously like an intentional bug to limit the ability of web apps to deliver advertisements. Maybe you can try open the new page in an iframe.

    0 讨论(0)
  • 2020-12-02 10:43

    Update 10/23/13: Fixed in iOS 7.0.3. Add a target="xxx" attribute to your links to do this. Also works with mailto: and friends.

    This is a bug in iOS 7.0, 7.0.1 and 7.0.2 and there's no known way to do this.

    It's a regression from earlier versions of iOS, where links that open in Safari work just fine. It appears to be a part of a cluster of problems revolving around opening URLs, with no external URL schemes working (for example "mailto:" doesn't work either).

    The usual suspects of working around a problem like this unfortunately don't work (for example using a form and submitting it with a target of "_new").

    There's other grave issues, like alert and confirm modal dialogs not working at all.

    It may help to submit these as bugs to Apple, http://bugreport.apple.com

    0 讨论(0)
  • 2020-12-02 10:43
    window.open('http://www.google.com/', '_system');
    

    this will open native Safari Application even on latest version of iOS...

    Happy coding!!

    0 讨论(0)
  • 2020-12-02 10:45
    window.open('http://www.google.com/'); // stays in web app view
    
    <a href='http://www.google.com/' target='_blank'>Click Here</a> // opens in safari
    

    If you want to open Safari, but using an anchor tag like this isn't possible for whatever reason, the JavaScript solution to this question will open in Safari as well.

    0 讨论(0)
提交回复
热议问题