作者:手机用户2602903963 | 来源:互联网 | 2023-05-18 03:29
iOS9introducesAppTransportSecurity(ATS)toencouragetheuseofsecureconnections.iOS9引入了Ap
iOS 9 introduces App Transport Security (ATS) to encourage the use of secure connections.
iOS 9引入了App Transport Security(ATS)以鼓励使用安全连接。
This is great, but what if my app has a built in web browser that the user should be able to use to connect to any website? For example, the Facebook app allows stories to contain links to external websites. When the user taps such a link, rather than launching Safari, it launches an in-app browser.
这很棒,但是如果我的应用程序有一个内置的Web浏览器,用户应该可以使用它连接到任何网站怎么办?例如,Facebook应用程序允许故事包含指向外部网站的链接。当用户点击这样的链接,而不是启动Safari时,它会启动应用内浏览器。
How can I get this same behavior without enabling the global NSAllowArbitraryLoads flag?
如何在不启用全局NSAllowArbitraryLoads标志的情况下获得相同的行为?
I want all the benefits of enforcing https usage, but want to disable this check in my internal browser. In an ideal world, Apple would allow me to specify a property on my UIWebView to allow it to load insecure URLs, rather than it being all or nothing. There is no way I can whitelist every single domain, since I have no idea which URLs my users will load. I'm looking for a solution that is compatible with iOS 8.
我想要强制执行https使用的所有好处,但想要在我的内部浏览器中禁用此检查。在一个理想的世界中,Apple允许我在我的UIWebView上指定一个属性,以允许它加载不安全的URL,而不是全部或全部。我无法将每个域列入白名单,因为我不知道用户将加载哪些URL。我正在寻找与iOS 8兼容的解决方案。
2 个解决方案