【问题标题】:React Native App Transport Security has blockedReact Native App Transport Security 已阻止
【发布时间】:2018-12-24 02:10:37
【问题描述】:

我刚刚安装了 react-native-image-crop。 当我尝试在实际的 iPhone 上拍照时,我收到了一个非常奇怪的错误。 'App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app's Info.plist file.'。这是因为我使用了地铁建设者吗?还是别的什么?

我的 Info.plist:

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

【问题讨论】:

标签: ios xcode react-native react-native-image


【解决方案1】:

你需要在 Info.plist 中添加这个键

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

【讨论】:

  • 这看起来不错! ArbitraryLoads 丢失了!谢谢队友:)
猜你喜欢
  • 2016-01-24
  • 2016-04-17
  • 2015-11-05
  • 2015-11-30
  • 2016-11-26
  • 2015-12-15
  • 2015-12-18
  • 1970-01-01
  • 2017-07-31
相关资源
最近更新 更多