Http fetch is not working after upgrading to react-native 0.28
After upgrading to the latest version, looks like fetch for http (note not https) based endpoints is broken. Was this change by design? What broke it?
Hot Reloading also doesnot work, i change it back to 0.27.2, it's work!
Found the problem. Looks like as part of the upgrade, the following changes happened to plist.Info:
Removed :
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
Added :
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>NSAppTransportSecurity</key>
<!--See http://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ -->
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>localhost</key>
<dict>
<key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
https://ste.vn/2015/06/10/configuring-app-transport-security-ios-9-osx-10-11/ for more info. You basically need to add the http domains that you use to the plist.Info
BTW I believe Apple announced they will require HTTPS everywhere so make sure you are ready for that.
@faisalil What we need to do for Android. This is for iOS. ? Thank you.