在Info.plist中添加NSAppTransportSecurity类型Dictionary。
NSAppTransportSecurity
Dictionary
在NSAppTransportSecurity下添加NSAllowsArbitraryLoads类型Boolean,值设为YES
NSAllowsArbitraryLoads
Boolean
YES