选择iOS应用程序中的App Transport Security功能

时间:2016-02-02 13:11:23

标签: ios ssl app-store client-server

从iOS 9 sdks开始,Apple推出了一项名为App Transport Security的安全功能,该功能默认启用。尝试连接到不安全的HTTP时系统失败。现在,我们通过在应用程序plist中将" App Transport Security Settings-Allow Arbitrary Loads“的值设置为YES来选择退出此功能。

参考

1) https://developer.apple.com/videos/play/wwdc2015-711/

2)https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

在我的应用程序中,它使用媒体服务器,并将服务器的URL动态地视为用户输入。在这种情况下,我无法向特定服务器添加例外,或者是否有办法以编程方式配置例外?

我无法找到任何文档告诉应用商店不会批准应用程序plist中使用App Transport Security Settings-Allow Arbitrary Loads的应用程序为YES。在选择退出新安全功能的情况下构建应用程序是否合法?

1 个答案:

答案 0 :(得分:1)

也许您可以为NSAllowsArbitraryLoadsForMedia设置选项。它允许您选择退出ATS以获取媒体资源。