Skip to content

Instantly share code, notes, and snippets.

@andrescalco
Created May 25, 2018 16:22
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrescalco/3dc9576840ad6bb2123f0780694f4363 to your computer and use it in GitHub Desktop.
Save andrescalco/3dc9576840ad6bb2123f0780694f4363 to your computer and use it in GitHub Desktop.
Add/Remove NSAppTransportSecurity rule for localhost on React Native ios project
"scripts": {
"enable_local": "plutil -insert NSAppTransportSecurity -xml \"<dict><key>NSExceptionDomains</key><dict><key>localhost</key><dict><key>NSExceptionAllowsInsecureHTTPLoads</key><true/></dict></dict></dict>\" ios/myProject/Info.plist",
"remove_local": "plutil -remove NSAppTransportSecurity ios/myProject/Info.plist"
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment