Skip to content

Commit 2184c87

Browse files
authored
Merge pull request #469 from XcodesOrg/matt/SparkleUpdate
update Sparkle to 2.5.2
2 parents efcf650 + 7aaf056 commit 2184c87

4 files changed

Lines changed: 118 additions & 31 deletions

File tree

Xcodes.xcodeproj/project.pbxproj

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
E86671272B309D2F0048559A /* PlatformsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E86671262B309D2F0048559A /* PlatformsView.swift */; };
122122
E87AB3C52939B65E00D72F43 /* Hardware.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87AB3C42939B65E00D72F43 /* Hardware.swift */; };
123123
E87DD6EB25D053FA00D86808 /* Progress+.swift in Sources */ = {isa = PBXBuildFile; fileRef = E87DD6EA25D053FA00D86808 /* Progress+.swift */; };
124+
E891A1C42B43ACF900A1B9D1 /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = E891A1C32B43ACF900A1B9D1 /* Sparkle */; };
124125
E89342FA25EDCC17007CF557 /* NotificationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = E89342F925EDCC17007CF557 /* NotificationManager.swift */; };
125126
E8977EA325C11E1500835F80 /* PreferencesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8977EA225C11E1500835F80 /* PreferencesView.swift */; };
126127
E8B20CBF2A2EDEC20057D816 /* SDKs+Xcode.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8B20CBE2A2EDEC20057D816 /* SDKs+Xcode.swift */; };
@@ -134,7 +135,6 @@
134135
E8E98A9025D8631800EC89A0 /* InstallationStepRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAFBC3FF259AC17F00E2A3D8 /* InstallationStepRowView.swift */; };
135136
E8E98A9625D863D700EC89A0 /* InstallationStepDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E98A9525D863D700EC89A0 /* InstallationStepDetailView.swift */; };
136137
E8F44A1E296B4CD7002D6592 /* Path in Frameworks */ = {isa = PBXBuildFile; productRef = E8F44A1D296B4CD7002D6592 /* Path */; };
137-
E8F81FC4282D8A17006CBD0F /* Sparkle in Frameworks */ = {isa = PBXBuildFile; productRef = E8F81FC3282D8A17006CBD0F /* Sparkle */; };
138138
E8FD5727291EE4AC001E004C /* AsyncNetworkService in Frameworks */ = {isa = PBXBuildFile; productRef = E8FD5726291EE4AC001E004C /* AsyncNetworkService */; };
139139
/* End PBXBuildFile section */
140140

@@ -344,12 +344,12 @@
344344
isa = PBXFrameworksBuildPhase;
345345
buildActionMask = 2147483647;
346346
files = (
347-
E8F81FC4282D8A17006CBD0F /* Sparkle in Frameworks */,
348347
CABFA9E42592F08E00380FEE /* Version in Frameworks */,
349348
CABFA9FD2592F13300380FEE /* LegibleError in Frameworks */,
350349
E689540325BE8C64000EBCEA /* DockProgress in Frameworks */,
351350
CA9FF86D25951C6E00E47BAF /* XCModel in Frameworks */,
352351
CABFA9F82592F0F900380FEE /* KeychainAccess in Frameworks */,
352+
E891A1C42B43ACF900A1B9D1 /* Sparkle in Frameworks */,
353353
CAA858CD25A3D8BC00ACF8C0 /* ErrorHandling in Frameworks */,
354354
E8C0EB1A291EF43E0081528A /* XcodesKit in Frameworks */,
355355
E8FD5727291EE4AC001E004C /* AsyncNetworkService in Frameworks */,
@@ -705,12 +705,12 @@
705705
CABFA9FC2592F13300380FEE /* LegibleError */,
706706
CA9FF86C25951C6E00E47BAF /* XCModel */,
707707
CAA858CC25A3D8BC00ACF8C0 /* ErrorHandling */,
708-
E8F81FC3282D8A17006CBD0F /* Sparkle */,
709708
E689540225BE8C64000EBCEA /* DockProgress */,
710709
E8FD5726291EE4AC001E004C /* AsyncNetworkService */,
711710
E8C0EB19291EF43E0081528A /* XcodesKit */,
712711
E8F44A1D296B4CD7002D6592 /* Path */,
713712
E84E4F562B335094003F3959 /* OrderedCollections */,
713+
E891A1C32B43ACF900A1B9D1 /* Sparkle */,
714714
);
715715
productName = XcodesMac;
716716
productReference = CAD2E79E2449574E00113D76 /* Xcodes.app */;
@@ -793,11 +793,11 @@
793793
CA9FF86B25951C6E00E47BAF /* XCRemoteSwiftPackageReference "data" */,
794794
CAA858CB25A3D8BC00ACF8C0 /* XCRemoteSwiftPackageReference "ErrorHandling" */,
795795
CAC28186259EE27200B8AB0B /* XCRemoteSwiftPackageReference "CombineExpectations" */,
796-
E8F81FC2282D8A17006CBD0F /* XCRemoteSwiftPackageReference "Sparkle" */,
797796
E689540125BE8C64000EBCEA /* XCRemoteSwiftPackageReference "DockProgress" */,
798797
E8FD5725291EE4AC001E004C /* XCRemoteSwiftPackageReference "AsyncHTTPNetworkService" */,
799798
E8F44A1C296B4CD7002D6592 /* XCRemoteSwiftPackageReference "Path" */,
800799
E84E4F552B335094003F3959 /* XCRemoteSwiftPackageReference "swift-collections" */,
800+
E891A1C22B43ACA400A1B9D1 /* XCRemoteSwiftPackageReference "Sparkle" */,
801801
);
802802
productRefGroup = CAD2E79F2449574E00113D76 /* Products */;
803803
projectDirPath = "";
@@ -1523,20 +1523,20 @@
15231523
minimumVersion = 1.0.5;
15241524
};
15251525
};
1526-
E8F44A1C296B4CD7002D6592 /* XCRemoteSwiftPackageReference "Path" */ = {
1526+
E891A1C22B43ACA400A1B9D1 /* XCRemoteSwiftPackageReference "Sparkle" */ = {
15271527
isa = XCRemoteSwiftPackageReference;
1528-
repositoryURL = "https://github.com/mxcl/Path.swift";
1528+
repositoryURL = "https://github.com/sparkle-project/Sparkle";
15291529
requirement = {
15301530
kind = upToNextMajorVersion;
1531-
minimumVersion = 1.0.0;
1531+
minimumVersion = 2.5.2;
15321532
};
15331533
};
1534-
E8F81FC2282D8A17006CBD0F /* XCRemoteSwiftPackageReference "Sparkle" */ = {
1534+
E8F44A1C296B4CD7002D6592 /* XCRemoteSwiftPackageReference "Path" */ = {
15351535
isa = XCRemoteSwiftPackageReference;
1536-
repositoryURL = "https://github.com/sparkle-project/Sparkle";
1536+
repositoryURL = "https://github.com/mxcl/Path.swift";
15371537
requirement = {
15381538
kind = upToNextMajorVersion;
1539-
minimumVersion = 2.0.0;
1539+
minimumVersion = 1.0.0;
15401540
};
15411541
};
15421542
E8FD5725291EE4AC001E004C /* XCRemoteSwiftPackageReference "AsyncHTTPNetworkService" */ = {
@@ -1599,6 +1599,11 @@
15991599
package = E84E4F552B335094003F3959 /* XCRemoteSwiftPackageReference "swift-collections" */;
16001600
productName = OrderedCollections;
16011601
};
1602+
E891A1C32B43ACF900A1B9D1 /* Sparkle */ = {
1603+
isa = XCSwiftPackageProductDependency;
1604+
package = E891A1C22B43ACA400A1B9D1 /* XCRemoteSwiftPackageReference "Sparkle" */;
1605+
productName = Sparkle;
1606+
};
16021607
E8C0EB19291EF43E0081528A /* XcodesKit */ = {
16031608
isa = XCSwiftPackageProductDependency;
16041609
productName = XcodesKit;
@@ -1608,11 +1613,6 @@
16081613
package = E8F44A1C296B4CD7002D6592 /* XCRemoteSwiftPackageReference "Path" */;
16091614
productName = Path;
16101615
};
1611-
E8F81FC3282D8A17006CBD0F /* Sparkle */ = {
1612-
isa = XCSwiftPackageProductDependency;
1613-
package = E8F81FC2282D8A17006CBD0F /* XCRemoteSwiftPackageReference "Sparkle" */;
1614-
productName = Sparkle;
1615-
};
16161616
E8FD5726291EE4AC001E004C /* AsyncNetworkService */ = {
16171617
isa = XCSwiftPackageProductDependency;
16181618
package = E8FD5725291EE4AC001E004C /* XCRemoteSwiftPackageReference "AsyncHTTPNetworkService" */;

Xcodes.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Xcodes/Frontend/Preferences/UpdatesPreferencePane.swift

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ struct UpdatesPreferencePane: View {
6969

7070
class ObservableUpdater: ObservableObject {
7171
private let updater: SPUUpdater
72-
72+
private let updaterDelegate = UpdaterDelegate()
73+
7374
@Published var automaticallyChecksForUpdates = false {
7475
didSet {
7576
updater.automaticallyChecksForUpdates = automaticallyChecksForUpdates
@@ -81,17 +82,17 @@ class ObservableUpdater: ObservableObject {
8182
@Published var includePrereleaseVersions = false {
8283
didSet {
8384
UserDefaults.standard.setValue(includePrereleaseVersions, forKey: "includePrereleaseVersions")
84-
85-
if includePrereleaseVersions {
86-
updater.setFeedURL(.prereleaseAppcast)
87-
} else {
88-
updater.setFeedURL(.appcast)
89-
}
85+
86+
updaterDelegate.includePrereleaseVersions = includePrereleaseVersions
9087
}
9188
}
9289

9390
init() {
94-
updater = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: nil, userDriverDelegate: nil).updater
91+
updater = SPUStandardUpdaterController(startingUpdater: true, updaterDelegate: updaterDelegate, userDriverDelegate: nil).updater
92+
93+
// upgrade from an old sparkle version which set feeds via the updater
94+
// now it uses the `updaterDelegate`
95+
updater.clearFeedURLFromUserDefaults()
9596

9697
automaticallyChecksForUpdatesObservation = updater.observe(
9798
\.automaticallyChecksForUpdates,
@@ -116,9 +117,22 @@ class ObservableUpdater: ObservableObject {
116117
}
117118
}
118119

119-
extension URL {
120-
static let appcast = URL(string: "https://www.xcodes.app/appcast.xml")!
121-
static let prereleaseAppcast = URL(string: "https://www.xcodes.app/appcast_pre.xml")!
120+
class UpdaterDelegate: NSObject, SPUUpdaterDelegate {
121+
var includePrereleaseVersions: Bool = false
122+
123+
func feedURLString(for updater: SPUUpdater) -> String? {
124+
if includePrereleaseVersions {
125+
return .prereleaseAppcast
126+
} else {
127+
return .appcast
128+
}
129+
}
130+
}
131+
132+
133+
extension String {
134+
static let appcast = "https://www.xcodes.app/appcast.xml"
135+
static let prereleaseAppcast = "https://www.xcodes.app/appcast_pre.xml"
122136
}
123137

124138
struct UpdatesPreferencePane_Previews: PreviewProvider {

Xcodes/Resources/Licenses.rtf

Lines changed: 76 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,86 @@ EXTERNAL LICENSES\
656656
=================\
657657
\
658658
bspatch.c and bsdiff.c, from bsdiff 4.3 <http://www.daemonology.net/bsdiff/>:\
659-
Copyright (c) 2003-2005 Colin Percival.\
659+
\
660+
Copyright 2003-2005 Colin Percival\
661+
All rights reserved\
662+
\
663+
Redistribution and use in source and binary forms, with or without\
664+
modification, are permitted providing that the following conditions \
665+
are met:\
666+
1. Redistributions of source code must retain the above copyright\
667+
notice, this list of conditions and the following disclaimer.\
668+
2. Redistributions in binary form must reproduce the above copyright\
669+
notice, this list of conditions and the following disclaimer in the\
670+
documentation and/or other materials provided with the distribution.\
671+
\
672+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\
673+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\
674+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\
675+
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY\
676+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\
677+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\
678+
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\
679+
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\
680+
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING\
681+
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\
682+
POSSIBILITY OF SUCH DAMAGE.\
683+
\
684+
--\
660685
\
661686
sais.c and sais.c, from sais-lite (2010/08/07) <https://sites.google.com/site/yuta256/sais>:\
662-
Copyright (c) 2008-2010 Yuta Mori.\
687+
\
688+
The sais-lite copyright is as follows:\
689+
\
690+
Copyright (c) 2008-2010 Yuta Mori All Rights Reserved.\
691+
\
692+
Permission is hereby granted, free of charge, to any person\
693+
obtaining a copy of this software and associated documentation\
694+
files (the "Software"), to deal in the Software without\
695+
restriction, including without limitation the rights to use,\
696+
copy, modify, merge, publish, distribute, sublicense, and/or sell\
697+
copies of the Software, and to permit persons to whom the\
698+
Software is furnished to do so, subject to the following\
699+
conditions:\
700+
\
701+
The above copyright notice and this permission notice shall be\
702+
included in all copies or substantial portions of the Software.\
703+
\
704+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\
705+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\
706+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\
707+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\
708+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\
709+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\
710+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\
711+
OTHER DEALINGS IN THE SOFTWARE.\
712+
\
713+
--\
714+
\
715+
Portable C implementation of Ed25519, from https://github.com/orlp/ed25519\
716+
\
717+
Copyright (c) 2015 Orson Peters <orsonpeters@gmail.com>\
718+
\
719+
This software is provided 'as-is', without any express or implied warranty. In no event will the\
720+
authors be held liable for any damages arising from the use of this software.\
721+
\
722+
Permission is granted to anyone to use this software for any purpose, including commercial\
723+
applications, and to alter it and redistribute it freely, subject to the following restrictions:\
724+
\
725+
1. The origin of this software must not be misrepresented; you must not claim that you wrote the\
726+
original software. If you use this software in a product, an acknowledgment in the product\
727+
documentation would be appreciated but is not required.\
728+
\
729+
2. Altered source versions must be plainly marked as such, and must not be misrepresented as\
730+
being the original software.\
731+
\
732+
3. This notice may not be removed or altered from any source distribution.\
733+
\
734+
--\
663735
\
664736
SUSignatureVerifier.m:\
665-
Copyright (c) 2011 Mark Hamlin.\
737+
\
738+
Copyright (c) 2011 Mark Hamlin.\
666739
\
667740
All rights reserved.\
668741
\

0 commit comments

Comments
 (0)