iOS Plist解析(官方链接)

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

Cocoa Keys

Cocoa and Cocoa Touch are the environments used to define Objective-C based apps that run in OS X and iOS respectively. The keys associated with the Cocoa environments provide support for Interface Builder nib files and provide support for other user-facing features vended by your bundle.

Cocoa keys use the prefix NS to distinguish them from other keys. For information about developing Cocoa Touch apps for iOS, see App Programming Guide for iOS. For information about developing Cocoa apps for OS X, see Cocoa Fundamentals Guide.

NSAppTransportSecurity

NSAppTransportSecurity (Dictionary - iOS, OS X) Use this key to describe your app’s intended network behavior if you require exceptions from best practices for secure communication over the Internet.

Starting in iOS 9.0 and OS X v10.11, App Transport Security (ATS) is enabled as a system default behavior. It improves the privacy and data integrity of connections between an app and web services by using the Transport Layer Security (TLS) protocol version 1.2 (RFC 5246). ATS converts all HTTP requests to HTTPS (RFC 2818) automatically; attempts to connect insecurely over the Internet fail.

The APIs that provide ATS are the NSURLConnection and NSURLSession classes and the CFURLRef opaque type.

If your app uses secure network connections exclusively and those connections use best-practice networking properties, you do not need to employ the NSAppTransportSecurity key.

If you link your app against an operating system older than iOS 9.0 or OS X v10.11, ATS is not available, and you would likewise not use this key.

Table 2 shows the keys for describing your app’s intended network behavior.

NSAllowsArbitraryLoads
Boolean
An optional Boolean value that, when set to YES, disables App Transport Security (ATS) for any domains not listed in the NSExceptionDomains dictionary.
NOTE Enabling this key is intended for debugging and development purposes.
Disabling ATS allows connection regardless of HTTP or HTTPS configuration, allows connection to servers with lower TLS versions, and allows cipher suites that do not support forward secrecy (FS).
With this key set to YES, a domain listed in the NSExceptionDomains dictionary uses the settings you specify for it.
This key’s default value of NO results in default ATS behavior for all connections.

Allowing Insecure Connection to a Single Server

To use ATS generally but allow connection to a specific server that does not support the HTTPS protocol—for example, a media server that your app uses—employ the following configuration pattern in your Info.plist file:

NSAppTransportSecurity
NSExceptionDomains
“media_server.example.com”
NSExceptionAllowsInsecureHTTPLoads = YES

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值