Files
Sparkle/Configurations/set-ats-exceptions-test-app.sh
T
Kent Sutherland 3ec3d6f2af Run codesign when signing identity is set to "-"
This creates an adhoc signature rather than not signing
2017-12-08 11:42:58 -06:00

13 lines
694 B
Bash
Executable File

#!/bin/sh
# We should make sure ATS is off for the test app
DOWNLOADER_INFO_PLIST="${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/XPCServices/"${DOWNLOADER_BUNDLE_ID}".xpc/Contents/Info.plist
#Only alter bundles if code signing is off, else we'll invalidate the signature on them
#If code signing is enabled (as in debug mode), then we rely on another script for turning ATS exceptions on for these services
#In release mode however, those services do not have ATS exceptions set up which is why we have to set up exceptions *here*
if [ -z "${CODE_SIGN_IDENTITY}" ] ; then
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${DOWNLOADER_INFO_PLIST}"
fi