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

相關文章
相關標籤/搜索