美文网首页
Could not connect to development

Could not connect to development

作者: 壁虎尾巴 | 来源:发表于2018-03-26 19:08 被阅读0次

RN提示服务器连接不上。
其中的原因之一有可能是在代码中用到了http访问服务器,而在iOS 9之后如果要用http访问就必须在info.plist文件里面添加一下内容

<key>NSAppTransportSecurity</key>
    <dict>
        <key>NSExceptionDomains</key>
        <dict>
            <key>localhost</key>
            <dict>
                <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
                <true/>
            </dict>
        </dict>
    </dict>

相关文章

网友评论

      本文标题:Could not connect to development

      本文链接:https://www.haomeiwen.com/subject/istdcftx.html