react-native0.44, i am use fetch request "http", but network request failed?
i'm from official find fetch only support
https, but now, i use Mock data, the url is
http, official said if support
http must change
NSAllowsArbitraryLoads, below the image:
App Transport Security Settings and children row
Allow Arbitrary Loads,
http not support! please ask how to resolve support Mock
http request in react-native ? Thanks!
i use Mock is Alibaba "Rap" Mock address, it's only support Mock
Info.plist will take effect after recompiling your app.
Probably you need to recompile your app by rerun
react-native run-iosor rerun from Xcode.
You should not use
NSAllowsArbitraryLoadsmust be set to
false. Instead you should add an exception to your domain.
<key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>yourserver.com</key> <dict> <!--Include to allow subdomains--> <key>NSIncludesSubdomains</key> <true/> <!--Include to allow HTTP requests--> <key>NSExceptionAllowsInsecureHTTPLoads</key> <true/> <!--Include to specify minimum TLS version--> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict>
Right now you are exposing your device to vunerabilities.
Checkout this post