mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Set up ATS exceptions for Test App in release mode
Now the test app works properly when building it in release.
This commit is contained in:
1 parent
1a3466ba04
commit
5dfe4ce71b
3 files changed
+41
-9
No files matched your search
+1
-1
@@ -7,6 +7,6 @@ case "${SPARKLE_ALLOW_ARBITRARY_HTTP_LOADS}" in
|
||||
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${INFOPLIST}"
|
||||
;;
|
||||
"NO"|"0")
|
||||
/usr/libexec/PlistBuddy -c "Delete :NSAppTransportSecurity" "${INFOPLIST}"
|
||||
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads NO" "${INFOPLIST}"
|
||||
;;
|
||||
esac
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
# We should make sure ATS is off for the test app
|
||||
|
||||
TEMPORARY_INFO_PLIST="${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/"XPCServices"/"${TEMPORARY_DOWNLOADER_BUNDLE_ID}.xpc"/"Contents"/"Info.plist"
|
||||
|
||||
PERSISTENT_INFO_PLIST="${TARGET_BUILD_DIR}"/"${CONTENTS_FOLDER_PATH}"/"XPCServices"/"${PERSISTENT_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" "${TEMPORARY_INFO_PLIST}"
|
||||
/usr/libexec/PlistBuddy -c "Set :NSAppTransportSecurity:NSAllowsArbitraryLoads YES" "${PERSISTENT_INFO_PLIST}"
|
||||
fi
|
||||
@@ -957,6 +957,8 @@
|
||||
728639041CAF614000783084 /* ConfigTemporaryDownloader.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigTemporaryDownloader.xcconfig; sourceTree = "<group>"; };
|
||||
7293A1AC1CEE933800B957A7 /* SUURLRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUURLRequest.h; sourceTree = "<group>"; };
|
||||
7293A1AD1CEE933800B957A7 /* SUURLRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SUURLRequest.m; sourceTree = "<group>"; };
|
||||
729BB3CD1D503253007C4276 /* set-ats-exceptions-test-app.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "set-ats-exceptions-test-app.sh"; sourceTree = "<group>"; };
|
||||
729BB3CE1D50344A007C4276 /* set-ats-exceptions-downloader-service.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "set-ats-exceptions-downloader-service.sh"; sourceTree = "<group>"; };
|
||||
729F10FD1C65A9B500DFCCC5 /* ConfigUITest.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITest.xcconfig; sourceTree = "<group>"; };
|
||||
729F10FE1C65A9B500DFCCC5 /* ConfigUITestCoverage.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigUITestCoverage.xcconfig; sourceTree = "<group>"; };
|
||||
72A450511C69A68900D67EEA /* SUUpdatePermission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SUUpdatePermission.h; sourceTree = "<group>"; };
|
||||
@@ -1013,7 +1015,6 @@
|
||||
72E45DDC1B65C3BD005C701A /* sign_update */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; name = sign_update; path = bin/sign_update; sourceTree = SOURCE_ROOT; };
|
||||
72EB87E91CB8798800C37F42 /* ShowInstallerProgress.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ShowInstallerProgress.m; path = Sparkle/InstallerProgress/ShowInstallerProgress.m; sourceTree = SOURCE_ROOT; };
|
||||
72F94EB01CC2A865002DEE68 /* ConfigCommonReleaseHTTP.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigCommonReleaseHTTP.xcconfig; sourceTree = "<group>"; };
|
||||
72F94ED31CC33F1E002DEE68 /* set-ats-exceptions.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "set-ats-exceptions.sh"; sourceTree = "<group>"; };
|
||||
72F94ED51CC3441A002DEE68 /* ConfigInstallerLauncherDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigInstallerLauncherDebug.xcconfig; sourceTree = "<group>"; };
|
||||
72F94ED61CC344A7002DEE68 /* ConfigPersistentDownloaderDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigPersistentDownloaderDebug.xcconfig; sourceTree = "<group>"; };
|
||||
72F94ED71CC344E4002DEE68 /* ConfigTemporaryDownloaderDebug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = ConfigTemporaryDownloaderDebug.xcconfig; sourceTree = "<group>"; };
|
||||
@@ -1819,7 +1820,8 @@
|
||||
72D954B01CBB41E2006F28BD /* ConfigSparkleTool.xcconfig */,
|
||||
14732BC91960F70A00593899 /* make-release-package.sh */,
|
||||
14652F7919A93E5F00959E44 /* set-git-version-info.sh */,
|
||||
72F94ED31CC33F1E002DEE68 /* set-ats-exceptions.sh */,
|
||||
729BB3CE1D50344A007C4276 /* set-ats-exceptions-downloader-service.sh */,
|
||||
729BB3CD1D503253007C4276 /* set-ats-exceptions-test-app.sh */,
|
||||
721D8A831D498F1D0032E472 /* set-agent-signing.sh */,
|
||||
146EC84E19A68CF8004A50C5 /* Sparkle.podspec */,
|
||||
);
|
||||
@@ -1978,6 +1980,7 @@
|
||||
61B5F90009C4CEE200B25A18 /* Frameworks */,
|
||||
61B5FB4D09C4E9FA00B25A18 /* Copy Frameworks */,
|
||||
726E4A261C86C88F00C57C6A /* Embed XPC Services */,
|
||||
729BB3CC1D501A8F007C4276 /* Run Script */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2091,7 +2094,7 @@
|
||||
726E07EB1CAF37BD001A286B /* Sources */,
|
||||
726E07EC1CAF37BD001A286B /* Frameworks */,
|
||||
726E07ED1CAF37BD001A286B /* Resources */,
|
||||
728639061CAF651300783084 /* ShellScript */,
|
||||
729BB3D01D50354C007C4276 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2126,7 +2129,7 @@
|
||||
728638EF1CAF5A5F00783084 /* Sources */,
|
||||
728638F01CAF5A5F00783084 /* Frameworks */,
|
||||
728638F11CAF5A5F00783084 /* Resources */,
|
||||
72F94ED41CC33F35002DEE68 /* ShellScript */,
|
||||
729BB3CF1D503531007C4276 /* ShellScript */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
@@ -2517,20 +2520,21 @@
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"$SRCROOT/Configurations/set-agent-signing.sh\"";
|
||||
};
|
||||
728639061CAF651300783084 /* ShellScript */ = {
|
||||
729BB3CC1D501A8F007C4276 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "${SRCROOT}/Configurations/set-ats-exceptions.sh";
|
||||
shellScript = "${SRCROOT}/Configurations/set-ats-exceptions-test-app.sh";
|
||||
};
|
||||
72F94ED41CC33F35002DEE68 /* ShellScript */ = {
|
||||
729BB3CF1D503531007C4276 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
@@ -2541,7 +2545,20 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "${SRCROOT}/Configurations/set-ats-exceptions.sh";
|
||||
shellScript = "${SRCROOT}/Configurations/set-ats-exceptions-downloader-service.sh";
|
||||
};
|
||||
729BB3D01D50354C007C4276 /* ShellScript */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "${SRCROOT}/Configurations/set-ats-exceptions-downloader-service.sh";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
|
||||
Reference in new issue
Block a user