一、开启http
-
在Info.plist中添加
NSAppTransportSecurity类型Dictionary。 -
在
NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为yes
二、配置pch文件
$(SRCROOT)/MicrogridProject/PrefixHeader.pch
备注:$(SRCROOT)/工程名称/pch文件
一、开启http
在Info.plist中添加NSAppTransportSecurity类型Dictionary。
在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为yes
二、配置pch文件
$(SRCROOT)/MicrogridProject/PrefixHeader.pch
备注:$(SRCROOT)/工程名称/pch文件
原文:http://www.cnblogs.com/shizhiliblog/p/8066327.html