Image Source URIs with HTTPS (SSL) Work, HTTP do NOT Work (React Native v0.30.0)

后端 未结 1 1367
面向向阳花
面向向阳花 2020-12-19 20:08

In React-Native version 30 certain images are not loading.

this is working



        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-19 20:39

    1. open ios/YourProject.xcodeproj in xcode
    2. open info.plist as Property List
    3. Right click on App Transport Security Settings > Add Row
    4. Add Allow Arbitrary Loads Boolean and set it to Yes
    5. rebuild your app.

    Xcode by default blocks all the http request and only allows https request. Because it is the right thing to do.

    Here is a blog post about App Transport Security: https://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/

    0 讨论(0)
提交回复
热议问题