Skip to content

Instantly share code, notes, and snippets.

@chuyihuang
Last active August 23, 2016 09:19
Show Gist options
  • Save chuyihuang/7b477d213fdb436d5a7e0c65b52a90f1 to your computer and use it in GitHub Desktop.
Save chuyihuang/7b477d213fdb436d5a7e0c65b52a90f1 to your computer and use it in GitHub Desktop.
處理react native network request fail的問題

參考: http://10minbasics.com/react-native-network-request-failed-fix/

First of all, when you try to use the network in your app, you should enable it in XCode.

  1. Click on your project in the Project Navigator
  2. Open the Info tab (打開info.plist檔案)
  3. Right click on App Transport Security Settings and select Add Row
  4. For created row set the key “Allow Arbitrary Loads“, type to boolean and value to YES.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment