<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>
:fa-question-circle:問題簡述:ATS會阻止未註冊的網絡請求,即:http統一採用https:TLS 1.2 SSLhtml
:fa-check-circle:解決案1:容許任何host的網絡請求ios
:fa-check-circle:解決案2:容許特定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