【问题标题】:Can we use NSAppTransportSecurity in XCode 6?我们可以在 XCode 6 中使用 NSAppTransportSecurity 吗?
【发布时间】:2015-10-27 18:25:57
【问题描述】:

在 WWDC 2015 上,Apple 宣布了适用于 iOS 9 的“App Transport Security”。为了解决 SSL 错误并绕过 App Transport Security,Apple 引入了一个密钥 NSAppTransportSecurity 以添加到 info.plist 中。我们可以在 Xcode 6 中使用这个键吗?

【问题讨论】:

    标签: xcode6 ios9 xcode7 ios-9-beta3 app-transport-security


    【解决方案1】:

    根据this technote

    App Transport Security is available on iOS 9.0 or later, and on OS X 10.11 and later.
    

    该功能仅适用于 iOS 9.0 或 MacOS 10.11 或更高版本,但您当然可以将密钥放入编译到应用程序中的任何 Info.plist 文件中。

    【讨论】:

    • 我可以在 ios9 模拟器中运行,网络服务运行良好。因此,如果我在 iOS9 公开发布之前将应用程序推送到应用商店,Apple 会拒绝构建,还是会在 ios9 公开版本发布后网络服务正常工作?
    • 我能够在 xcode6 中编译并且服务工作正常。请你的想法。
    • 啊,你是对的。您可以将几乎任何键放入 info.plist 文件中(只要它符合字符串或 int 或 bool 类型或其他类型),它将与 Xcode 5、6、7 等一起编译。实际功能只会是不过是在 iOS 9 中使用的。
    • 谢谢。我正在尝试在 ios9 设备中安装从 xcode6.0 创建的 ipa,并检查服务是否正常工作。
    猜你喜欢
    • 2014-07-23
    • 2014-11-16
    • 2014-08-06
    • 1970-01-01
    • 2011-06-30
    • 2017-01-15
    • 2011-06-02
    • 2023-03-25
    • 1970-01-01
    相关资源
    最近更新 更多