Can't show Image by URI in React Native iOS Simulator

The problem is that your are trying to load the image from a http connection and not from a https connection as it is demanded by Apple.

Try if your code works with another uri which uses https instead of http. In Android it should work fine with either http or https.

Read more at https://github.com/facebook/react-native/issues/8520 and WWDC 2016: Apple to require HTTPS encryption on all iOS apps by 2017.

If you really want to load something over http you can edit the info.plist file and add your exception there. More detailed info here: Configuring App Transport Security Exceptions in iOS 9 and OSX 10.11.

See also my StackOverflow question here: React-native loading image over https works while http does not work.


Here is a sample code for Hamburger icon in image-

<Image source={{ uri: 'http://i.imgur.com/vKRaKDX.png', width: 32, height: 32, }} /> 

for more info you can refer here-https://facebook.github.io/react-native/docs/image.html


just edit list.info file at field: "NSAppTransportSecurity" into ios of React Native such as:

<dict>
    <key>NSExceptionDomains</key>
    <dict>
        <key>localhost</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
        </dict>
        <key>resizing.flixster.com</key>
        <dict>
            <!--Include to allow subdomains-->
            <key>NSIncludesSubdomains</key>
            <true/>
            <!--Include to allow HTTP requests-->
            <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <!--Include to specify minimum TLS version-->
            <key>NSTemporaryExceptionMinimumTLSVersion</key>
            <string>TLSv1.1</string>
        </dict>
    </dict>
</dict>