之前没有这个错“Type Error: Network request failed”,然后之后有了,很纳闷。 通过查找发现是ios9之后请求必须走https不然系统就给你禁掉了。解决办法   Info.plist文件里修改 <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true/> <key>NSExceptionDomains</key> <dict> <key>localhost</key> <dict> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> </dict> </dict> </dict> 这个官方网站也有提,“Running On Device”这节。

上一篇:
下一篇:

相关文章:

Categories: 博客记录

0 Responses so far.

Leave a Reply