我在使用Parse.com后端的应用程序中不断出现此类错误:
App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app’s Info.plist file.
@H_404_5@我已经尝试将以下内容添加到我的info.plist中,但它没有奏效.没有其他解决方案在线工作.有谁知道该怎么办?
<key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSExceptionDomains</key> <dict> <key>files.parsetfss.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSExceptionsAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict>
解决方法
这个plist条目对我有用 –
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>files.parsetfss.com</key> <dict> <key>NSIncludeSubdomains</key> <true/> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict>
您有关键的NSIncludesSubdomains而不是NSIncludeSubdomains – ‘Include’和’Subdomains’之间的额外内容