Skip to content

Instantly share code, notes, and snippets.

@itsthejb
Last active February 17, 2016 15:07
Show Gist options
  • Save itsthejb/4dd10f3af2aeb1b061d2 to your computer and use it in GitHub Desktop.
Save itsthejb/4dd10f3af2aeb1b061d2 to your computer and use it in GitHub Desktop.
Run Script Phase: Disable App Transport Security for Debug Config
if [ "${CONFIGURATION}" == "Debug" ]; then
/usr/libexec/PlistBuddy -c "Set NSAppTransportSecurity:NSAllowsArbitraryLoads true" ${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Info.plist
fi
@itsthejb
Copy link
Author

Also, needs the entry in the plist with false

<key>NSAppTransportSecurity</key>  
     <dict>  
          <key>NSAllowsArbitraryLoads</key><false/>  
     </dict>  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment