Files
Sparkle/Configurations/set-ats-exceptions.sh
T
Zorg 3b892524a6 Rewrite ATS check by distinguishing if Sparkle is in XPC service or not
If it's not in a XPC service, then the main bundle decides the rules.
2016-04-17 23:01:20 -04:00

13 lines
429 B
Bash
Executable File

#!/bin/sh
# http://stackoverflow.com/questions/32390228/is-it-possible-to-disable-ats-in-ios-9-just-for-debug-environment
INFOPLIST="${TARGET_BUILD_DIR}"/"${INFOPLIST_PATH}"
case "${SPARKLE_ALLOW_ARBITRARY_HTTP_LOADS}" in
"YES"|"1")
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${INFOPLIST}"
;;
"NO"|"0")
/usr/libexec/PlistBuddy -c "Delete :NSAppTransportSecurity" "${INFOPLIST}"
;;
esac