Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose -[SPUStandardUserDriver activeUpdateAlert] as private API #2255

Merged
merged 1 commit into from
Sep 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Sparkle.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
72BC6C3D275027BF0083F14B /* SparkleTestCodeSign_apfs.dmg in Resources */ = {isa = PBXBuildFile; fileRef = 72BC6C3C275027BF0083F14B /* SparkleTestCodeSign_apfs.dmg */; };
72BEBFEF1D7287570019146B /* SUSpotlightImporterTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72BEBFEE1D7287560019146B /* SUSpotlightImporterTest.swift */; };
72CCDEBE27421FD500B53718 /* SparkleTestCodeSignApp_bad_header.zip in Resources */ = {isa = PBXBuildFile; fileRef = 72CCDEBD27421FD500B53718 /* SparkleTestCodeSignApp_bad_header.zip */; };
72D60CD928C2BAE900189AB8 /* SPUStandardUserDriver+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 72D60CD828C2BA2100189AB8 /* SPUStandardUserDriver+Private.h */; settings = {ATTRIBUTES = (Private, ); }; };
72D954811CBACC35006F28BD /* InstallerProgressAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D954801CBACC35006F28BD /* InstallerProgressAppController.m */; };
72D954831CBAD34F006F28BD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D954821CBAD34F006F28BD /* main.m */; };
72D954A21CBB415C006F28BD /* SPUCommandLineDriver.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D954A11CBB415C006F28BD /* SPUCommandLineDriver.m */; };
Expand Down Expand Up @@ -1356,6 +1357,7 @@
72BC6C3C275027BF0083F14B /* SparkleTestCodeSign_apfs.dmg */ = {isa = PBXFileReference; lastKnownFileType = file; path = SparkleTestCodeSign_apfs.dmg; sourceTree = "<group>"; };
72BEBFEE1D7287560019146B /* SUSpotlightImporterTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SUSpotlightImporterTest.swift; sourceTree = "<group>"; };
72CCDEBD27421FD500B53718 /* SparkleTestCodeSignApp_bad_header.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = SparkleTestCodeSignApp_bad_header.zip; sourceTree = "<group>"; };
72D60CD828C2BA2100189AB8 /* SPUStandardUserDriver+Private.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SPUStandardUserDriver+Private.h"; sourceTree = "<group>"; };
72D9547F1CBACC35006F28BD /* InstallerProgressAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstallerProgressAppController.h; path = Sparkle/InstallerProgress/InstallerProgressAppController.h; sourceTree = SOURCE_ROOT; };
72D954801CBACC35006F28BD /* InstallerProgressAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = InstallerProgressAppController.m; path = Sparkle/InstallerProgress/InstallerProgressAppController.m; sourceTree = SOURCE_ROOT; };
72D954821CBAD34F006F28BD /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Sparkle/InstallerProgress/main.m; sourceTree = SOURCE_ROOT; };
Expand Down Expand Up @@ -2205,6 +2207,7 @@
7246E0A11C83B685003B4E75 /* SPUStandardUpdaterController.h */,
7246E0A21C83B685003B4E75 /* SPUStandardUpdaterController.m */,
725CB9581C7121830064365A /* SPUStandardUserDriver.h */,
72D60CD828C2BA2100189AB8 /* SPUStandardUserDriver+Private.h */,
725CB9591C7121830064365A /* SPUStandardUserDriver.m */,
726E4A361C89116000C57C6A /* SPUStandardUserDriverDelegate.h */,
722C9538286EA54A0033908A /* SPUGentleUserDriverReminders.h */,
Expand Down Expand Up @@ -2482,6 +2485,7 @@
7246E0A31C83B685003B4E75 /* SPUStandardUpdaterController.h in Headers */,
725CB95A1C7121830064365A /* SPUStandardUserDriver.h in Headers */,
726E4A371C89116000C57C6A /* SPUStandardUserDriverDelegate.h in Headers */,
72D60CD928C2BAE900189AB8 /* SPUStandardUserDriver+Private.h in Headers */,
722C9539286EA68C0033908A /* SPUGentleUserDriverReminders.h in Headers */,
729F7EAF273F1840004592DC /* SPUUserAgent+Private.h in Headers */,
72EE17FC26D1CC9D00C58B19 /* SPUInstallationType.h in Headers */,
Expand Down
31 changes: 31 additions & 0 deletions Sparkle/SPUStandardUserDriver+Private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// SPUStandardUserDriver+Private.h
// Sparkle
//
// Copyright © 2022 Sparkle Project. All rights reserved.
//

#ifndef SPUStandardUserDriver_Private_h
#define SPUStandardUserDriver_Private_h

#import <Sparkle/SPUStandardUserDriver.h>
#import <Sparkle/SUExport.h>

@class NSWindowController;

NS_ASSUME_NONNULL_BEGIN

SU_EXPORT @interface SPUStandardUserDriver (Private)

/**
Private API for accessing the active update alert's window controller.
This is the window controller that shows the update's release notes and install choices.
This can be accessed in -[SPUStandardUserDriverDelegate standardUserDriverWillHandleShowingUpdate:forUpdate:state:]
*/
@property (nonatomic, readonly, nullable) NSWindowController *activeUpdateAlert;

@end

NS_ASSUME_NONNULL_END

#endif /* SPUStandardUserDriver_Private_h */
1 change: 1 addition & 0 deletions Sparkle/SPUStandardUserDriver.m
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ @interface SPUStandardUserDriver () <SPUGentleUserDriverReminders>
@property (nonatomic, copy) void (^cancellation)(void);

@property (nonatomic) SUStatusController *checkingController;
// Note: we expose a private interface for activeUpdateAlert in SPUStandardUserDriver+Private.h as NSWindowController
@property (nonatomic) SUUpdateAlert *activeUpdateAlert;
@property (nonatomic) SUStatusController *statusController;
@property (nonatomic) SUUpdatePermissionPrompt *permissionPrompt;
Expand Down