iOS之[info.plist相关问题解决案]

1.设置app支持各类后台

Required background modes

<key>UIBackgroundModes</key>
    <array>
        <string>audio</string>
        <string>location</string>
        <string>voip</string>
        <string>newsstand-content</string>
        <string>external-accessory</string>
        <string>bluetooth-central</string>
        <string>bluetooth-peripheral</string>
        <string>fetch</string>
        <string>remote-notification</string>
    </array>

2.(ATS)IOS9网络通信采用https

:fa-question-circle:问题简述:ATS会阻止未注册的网络请求,即:http统一采用https:TLS 1.2 SSLhtml

:fa-check-circle:解决案1:容许任何host的网络请求ios

容许任何host的网络请求

:fa-check-circle:解决案2:容许特定host的网络请求网络

容许特定host的网络请求

<key>NSAppTransportSecurity</key>
    <dict>
    	<key>NSExceptionDomains</key>
	<dict>
	    <key>www.weather.com.cn</key>
	    <dict>
                <key>NSIncludesSubdomains</key>
       	        <true/>

	        <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
	        <true/>

	        <key>NSTemporaryExceptionMinimumTLSVersion</key>
	        <string>TLSv1.1</string>
            <dict/>
	</dict>
    </dict>

NSExceptionDomains:里面放的是容许使用http请求的sever字典app

www.weather.com.cn:容许使用http请求的sever的名字dom

NSIncludesSubdomains:是否容许子域名fetch

NSTemporaryExceptionAllowsInsecureHTTPLoads:是否容许进行http请求ui

:fa-hand-o-right:TLSv1.1 :httpcode

:fa-hand-o-right:TLSv1.2 :httpsorm

3.StatusBar隐藏显示

4.官方info.plist中各类key的解释

Information Property List Key Reference: iOS Keyshtm

相关文章
相关标签/搜索