如图当运行React-Native(0.31)时会报如下错误
在React-Native版本0.26之前修改该错误是将URL路径换为本地IP地址(http://192.168.1.102:8081/index.ios.bundle?platform=ios&dev=true)但是在0.31版本中这样修改并不起作用。
经过查阅资料的需要在Plist文件中添加
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key><true/>
</dict>
即可起作用