1.在Info.plist中添加NSAppTransportSecurity類型Dictionary。

添加NSAppTransportSecurity.png
2.在NSAppTransportSecurity下添加NSAllowsArbitraryLoads類型Boolean,值設為YES

在圖1紅箭頭處右鍵選擇Add Row.png

添加NSAllowsArbitraryLoads.png
完成!
1.在Info.plist中添加NSAppTransportSecurity類型Dictionary。
2.在NSAppTransportSecurity下添加NSAllowsArbitraryLoads類型Boolean,值設為YES
完成!