From 43b5382daf42d9954e6555451f0b84ea34d2bcf9 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Fri, 2 Nov 2018 13:09:57 -0400 Subject: [PATCH 01/10] Rename INSTALL to INSTALL.markdown so it will present as a readable file on GitHub. --- INSTALL => INSTALL.markdown | 0 Sparkle.xcodeproj/project.pbxproj | 2 ++ 2 files changed, 2 insertions(+) rename INSTALL => INSTALL.markdown (100%) diff --git a/INSTALL b/INSTALL.markdown similarity index 100% rename from INSTALL rename to INSTALL.markdown diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 11f340d7..addb3a9c 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -942,6 +942,7 @@ 61F3AC1615C22D5900260CA2 /* th */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = th; path = th.lproj/SUUpdateAlert.xib; sourceTree = ""; }; 61F3AC1715C22D5900260CA2 /* th */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = th; path = th.lproj/SUUpdatePermissionPrompt.xib; sourceTree = ""; }; 61F614540E24A12D009F47E7 /* it */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Sparkle.strings; sourceTree = ""; }; + 657C5F2B218CBC1700925834 /* INSTALL.markdown */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = INSTALL.markdown; sourceTree = SOURCE_ROOT; }; 7205C43E1E13049400E370AE /* generate_appcast */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = generate_appcast; sourceTree = BUILT_PRODUCTS_DIR; }; 7205C4401E13049400E370AE /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = ""; }; 7205C4461E1304C300E370AE /* Appcast-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Appcast-Bridging-Header.h"; sourceTree = ""; }; @@ -1489,6 +1490,7 @@ 147D6D9E1B66DC3C006607AB /* CheckLocalizations.swift */, 1420DF4F196247F900203BB0 /* Images.xcassets */, 14732BBC1960EFB500593899 /* README.markdown */, + 657C5F2B218CBC1700925834 /* INSTALL.markdown */, 14732BB91960EEEE00593899 /* SampleAppcast.xml */, 615AE3CF0D64DC40001CA7BD /* SUModelTranslation.plist */, 1EAA4C8A2132C7BF00604473 /* DarkAqua.css */, From 9e67ef244bed10f91861c537327524ef921161ec Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Fri, 2 Nov 2018 13:12:48 -0400 Subject: [PATCH 02/10] Change to Markdown style headings. --- INSTALL.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index fa6c31ab..3165be5a 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -1,4 +1,4 @@ -== Building == +# Building If release products have not already been built, they can be built by: @@ -8,7 +8,7 @@ Or build the "Distribution" scheme from within the Xcode project. Debug builds of Sparkle can also be built from Xcode. Note that debug builds change Sparkle's default behavior to ease development. Never use a debug build of Sparkle for distribution. -== Installing == +# Installing To install Sparkle, you can copy Sparkle.framework into your project as you would any other framework. Make sure you have a build phase to copy the framework into your application's Frameworks directory. @@ -29,10 +29,10 @@ After signing the services, copy them into your project and set up a build phase Then test if your application works :). -== System Requirements == +# System Requirements This version of Sparkle only supports running on macOS 10.8 and later -== Known Issues == +# Known Issues https://github.com/zorgiepoo/sparkle-ui-xpc-issues/issues From 9b960233ca8732bfe1356b513edbc86bd547f720 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Fri, 2 Nov 2018 13:34:06 -0400 Subject: [PATCH 03/10] Taking a stab at rewriting some of the instructional content to be more clearly understood by folks just getting familiar with the XPC version of the project. Removed the 'Requirements' section because it's out of date with the README and doesn't need to be listed redundantly. --- INSTALL.markdown | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index 3165be5a..4861be9a 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -10,29 +10,32 @@ Debug builds of Sparkle can also be built from Xcode. Note that debug builds cha # Installing -To install Sparkle, you can copy Sparkle.framework into your project as you would any other framework. Make sure you have a build phase to copy the framework into your application's Frameworks directory. +To install Sparkle, drag Sparkle.framework into your project as you would any other framework. Make sure you have a build phase to copy the framework into your application's Frameworks directory at build time. -Sparkle has a few components that can optionally be handed off to XPC services. If you sandbox your application, you will need to use these. +# XPC Services -If you have a sandboxed application and it has a "com.apple.security.network.client" entitlement to allow for outgoing HTTP connections, then the Downloader service is not necessary to include. If you do decide to include the Downloader service and your application does not pass Apple's App Transport Security requirements, then you may have to add exceptions inside the downloader service's Info.plist. +If your application is sandboxed, you will need to embed one or more of Sparkle's XPC services into your application. These are used to perform privileged operations that your sandboxed app, and the rest of the Sparkle framework, are not authorized to perform. -If you have a sandboxed application that does not have the entitlement mentioned above for allowing outgoing HTTP connections, then linked release notes cannot contain external references (eg: images or external style sheets). +* `SparkleInstallerLauncher`: This is required for all sandboxed apps and is used by Sparkle to perform the privileged operation of upgrading your app and relaunching it. -If you want to code sign Sparkle's installer tools (Autoupdate and Updater.app), then you should include the InstallerLauncher XPC service regardless if you have a sandboxed application or not. Note Sparkle keeps a copy of these tools inside its framework's resources because using the XPC services is optional, and they need to be inside the XPC service for security reasons. If you wish, you can remove them from the framework if you use the InstallerLauncher service. +* `SparkleDownloader`: This is required only if your sandboxed app does not already possess the "com.apple.security.network.client" entitlement, allowing it to make outgoing HTTP(S) connections. If you do decide to include the Downloader service and your app does not pass Apple's App Transport Security requirements, then you may have to add exceptions inside the downloader service's Info.plist. -If you code sign your application, these XPC services will also need to be signed by you with the attached entitlements. Included is a script to automate this. +Note: If your sandboxed app does not have the networking entitlement mentioned above, then linked release notes cannot contain external references (e.g.: images or external style sheets), because loading them will be prevented by the sandbox. + +Apps that are not sandboxed may still want to embed the services if they need to code sign the services with their own signatures. The copies of these services within the built Sparkle framework will have the same signature as the framework. + +If you want to code sign Sparkle's installer tools (Autoupdate and Updater.app), then you should include the SparkleInstallerLauncher XPC service even if your app is not sandboxed. Note that Sparkle keeps a copy of these tools inside the framework, because using the XPC services is optional, and they need to be inside the XPC service for security reasons. If you wish, you can remove them from the framework if you use the InstallerLauncher service. + +If you code sign your application, these XPC services also need to be signed by you with the attached entitlements. Included is a script to automate this. + +Here is an example of invoking the script with the default Developer ID identity: -Here is an example of invoking the script with my Developer ID: > ./bin/codesign_xpc "Developer ID Application" XPCServices/*.xpc -After signing the services, copy them into your project and set up a build phase to embed the XPC Services into your application. +After signing the services, drag them into your project and set up a build phase to embed the XPC Services into your application. Then test if your application works :). -# System Requirements - -This version of Sparkle only supports running on macOS 10.8 and later - # Known Issues https://github.com/zorgiepoo/sparkle-ui-xpc-issues/issues From fbbb44bf73985213afaf6607bc26b3c7dc9c6d55 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Fri, 2 Nov 2018 15:38:08 -0400 Subject: [PATCH 04/10] Add links to the INSTALL document to make it easier to access. --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 094a7c25..ad056dcf 100644 --- a/README.markdown +++ b/README.markdown @@ -12,7 +12,7 @@ New issues that are found should be [reported here](https://github.com/zorgiepoo ## Sandboxing -This fork includes several XPC services that are generally optional to include in your application, but are required for sandboxed applications. See the `INSTALL` file for more detail. +This fork includes several XPC services that are generally optional to include in your application, but are required for sandboxed applications. See the [INSTALL](INSTALL.markdown) file for more detail. When sandboxed, linked release notes are allowed. External references inside the linked release notes are only allowed if the host application has an incoming network entitlement. Lastly, updates can still be extracted from DMG files just as they are in the official branch. @@ -84,7 +84,7 @@ If you are adding a symbol to the public API you must decorate the declaration w Alternatively, build the Distribution scheme in the Xcode UI. -See the `INSTALL` file after building Sparkle, especially if interested in sandboxing support. The XPC services are not required for non-sandboxed applications. +See the [INSTALL](INSTALL.markdown) file after building Sparkle, especially if interested in sandboxing support. The XPC services are not required for non-sandboxed applications. ## Code of Conduct From 8f65c07a1af2b2c577a3d08d603dfdff9695b4ba Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:07:53 -0500 Subject: [PATCH 05/10] Remove links to the zorgiepoo issues database because zorgiepoo indicated surprise about people still coming there, and because issues are being tracked in the main repository's issues. --- INSTALL.markdown | 2 +- README.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index 4861be9a..d4a91743 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -38,4 +38,4 @@ Then test if your application works :). # Known Issues -https://github.com/zorgiepoo/sparkle-ui-xpc-issues/issues +Search the (issues database)[issues] for bugs specific to the `ui-separation-and-xpc` branch. diff --git a/README.markdown b/README.markdown index ad056dcf..b9113192 100644 --- a/README.markdown +++ b/README.markdown @@ -6,7 +6,7 @@ A major fork to the popular Sparkle update framework that supports sandboxing, c This fork's current status is beta. I am no longer looking into adding or rewriting major functionality, and would like to finalize and have it be battle tested. -New issues that are found should be [reported here](https://github.com/zorgiepoo/sparkle-ui-xpc-issues/issues), and internal design documents can be found in `Documentation`. Discussion of this fork can be found on the [official branch](https://github.com/sparkle-project/Sparkle/issues/363). +New issues that are found should be [reported here](https://github.com/sparkle-project/issues), with an indication in the title that they pertain to the `ui-separation-and-xpc` branch. Internal design documents can be found in (Documentation)[Documentation/]. Discussion of this fork can be found in [this issue](https://github.com/sparkle-project/Sparkle/issues/363). # Features From 05393a8223c1084170ead9fb55c95cfa6982dc48 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:10:50 -0500 Subject: [PATCH 06/10] Trying to fix links --- INSTALL.markdown | 2 +- README.markdown | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index d4a91743..d968a32f 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -38,4 +38,4 @@ Then test if your application works :). # Known Issues -Search the (issues database)[issues] for bugs specific to the `ui-separation-and-xpc` branch. +Search the (issues database)[https://github.com/sparkle-project/Sparkle/issues] for bugs specific to the `ui-separation-and-xpc` branch. diff --git a/README.markdown b/README.markdown index b9113192..6c592878 100644 --- a/README.markdown +++ b/README.markdown @@ -6,7 +6,7 @@ A major fork to the popular Sparkle update framework that supports sandboxing, c This fork's current status is beta. I am no longer looking into adding or rewriting major functionality, and would like to finalize and have it be battle tested. -New issues that are found should be [reported here](https://github.com/sparkle-project/issues), with an indication in the title that they pertain to the `ui-separation-and-xpc` branch. Internal design documents can be found in (Documentation)[Documentation/]. Discussion of this fork can be found in [this issue](https://github.com/sparkle-project/Sparkle/issues/363). +New issues that are found should be [reported here](https://github.com/sparkle-project/issues), with an indication in the title that they pertain to the `ui-separation-and-xpc` branch. Internal design documents can be found in (Documentation)[Documentation]. Discussion of this fork can be found in [this issue](https://github.com/sparkle-project/Sparkle/issues/363). # Features From 5bf8730c6b75128bf19e01d89ee5977f2fdc0917 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:11:36 -0500 Subject: [PATCH 07/10] I had the Markdown link backwards. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 6c592878..676f4bbd 100644 --- a/README.markdown +++ b/README.markdown @@ -6,7 +6,7 @@ A major fork to the popular Sparkle update framework that supports sandboxing, c This fork's current status is beta. I am no longer looking into adding or rewriting major functionality, and would like to finalize and have it be battle tested. -New issues that are found should be [reported here](https://github.com/sparkle-project/issues), with an indication in the title that they pertain to the `ui-separation-and-xpc` branch. Internal design documents can be found in (Documentation)[Documentation]. Discussion of this fork can be found in [this issue](https://github.com/sparkle-project/Sparkle/issues/363). +New issues that are found should be [reported here](https://github.com/sparkle-project/issues), with an indication in the title that they pertain to the `ui-separation-and-xpc` branch. Internal design documents can be found in [Documentation](Documentation/). Discussion of this fork can be found in [this issue](https://github.com/sparkle-project/Sparkle/issues/363). # Features From 75b7066a6e68b6fad9db098e15cc649e152ce7d9 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:16:13 -0500 Subject: [PATCH 08/10] Add two other XPC services that seems to be required by most if not all sandboxed apps. I am not 100% sure I understand the role yet of these but as an instructional document this gets at the requirements in a way that is better than nothing. --- INSTALL.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index d968a32f..17c27e6e 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -14,9 +14,9 @@ To install Sparkle, drag Sparkle.framework into your project as you would any ot # XPC Services -If your application is sandboxed, you will need to embed one or more of Sparkle's XPC services into your application. These are used to perform privileged operations that your sandboxed app, and the rest of the Sparkle framework, are not authorized to perform. +If your application is sandboxed, you will need to embed one or more of Sparkle's XPC services into your application. These are used to perform privileged operations that your sandboxed app, and the rest of the Sparkle framework, are not authorized to perform. Even if you are not strictly required to use a particular XPC service, there may still be some merit to separating privileges. -* `SparkleInstallerLauncher`: This is required for all sandboxed apps and is used by Sparkle to perform the privileged operation of upgrading your app and relaunching it. +* `SparkleInstallerLauncher`, `SparkleInstallerConnection`, and `SparkleInstallerStatus`: These are required for most sandboxed apps, and are used by Sparkle to perform the privileged operations of upgrading your app, relaunching it, and reporting progress to the app as it proceeds. * `SparkleDownloader`: This is required only if your sandboxed app does not already possess the "com.apple.security.network.client" entitlement, allowing it to make outgoing HTTP(S) connections. If you do decide to include the Downloader service and your app does not pass Apple's App Transport Security requirements, then you may have to add exceptions inside the downloader service's Info.plist. From 01bacb964759f9afc677b02d840a4bf2f1add2c4 Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:51:08 -0500 Subject: [PATCH 09/10] Another backwards-coded Markdown link. --- INSTALL.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.markdown b/INSTALL.markdown index 17c27e6e..4000f03c 100644 --- a/INSTALL.markdown +++ b/INSTALL.markdown @@ -38,4 +38,4 @@ Then test if your application works :). # Known Issues -Search the (issues database)[https://github.com/sparkle-project/Sparkle/issues] for bugs specific to the `ui-separation-and-xpc` branch. +Search the [issues database](https://github.com/sparkle-project/Sparkle/issues) for bugs specific to the `ui-separation-and-xpc` branch. From 2f6587f5a63dc63c1d94eb1e63d7b74dee800d2d Mon Sep 17 00:00:00 2001 From: Daniel Jalkut Date: Sun, 4 Nov 2018 12:53:41 -0500 Subject: [PATCH 10/10] Add a note in Usage to indicate additional configuration is required for Sandboxed apps. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 676f4bbd..bde95657 100644 --- a/README.markdown +++ b/README.markdown @@ -69,7 +69,7 @@ New Sparkle classes are now prefixed with `SPU` rather than `SU`. Older classes ## Usage -See [getting started guide](https://sparkle-project.org/documentation/). No code is necessary, but a bit of Xcode configuration is required. +See [getting started guide](https://sparkle-project.org/documentation/). No code is necessary, but a bit of Xcode configuration is required. If your app is sandboxed, see the [INSTALL](INSTALL.markdown) document for more details about installing XPC binaries that support sandboxed apps. ## Development