Add API annotations for Swift concurrency (#2827)

This commit is contained in:
Zorg authored and GitHub committed 2026-01-02 19:44:20 -08:00
1 parent 5e527f9a11
commit b4f427b747
13 files changed
+15 -18

No files matched your search

+1 -1
View File
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
* A class for containing downloaded data along with some information about it.
*/
SU_EXPORT @interface SPUDownloadData : NSObject <NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUDownloadData : NSObject <NSSecureCoding>
/**
* The raw data that was downloaded.
+1 -1
View File
@@ -40,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN
This class must be used on the main thread.
*/
SU_EXPORT @interface SPUStandardUpdaterController : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUStandardUpdaterController : NSObject
{
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wobjc-interface-ivars"
+1 -1
View File
@@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
Sparkle's standard built-in user driver for updater interactions
*/
SU_EXPORT @interface SPUStandardUserDriver : NSObject <SPUUserDriver>
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUStandardUserDriver : NSObject <SPUUserDriver>
/**
Initializes a Sparkle's standard user driver for user update interactions
+1 -1
View File
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
This class represents information needed to make a permission request for checking updates.
*/
SU_EXPORT @interface SPUUpdatePermissionRequest : NSObject<NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUUpdatePermissionRequest : NSObject<NSSecureCoding>
/**
Initializes a new update permission request instance.
+1 -1
View File
@@ -45,7 +45,7 @@ NS_ASSUME_NONNULL_BEGIN
This class must be used on the main thread.
*/
SU_EXPORT @interface SPUUpdater : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUUpdater : NSObject
/**
Initializes a new `SPUUpdater` instance
+1 -1
View File
@@ -66,7 +66,7 @@ SU_EXPORT extern NSString *const SUSystemProfilerPreferredLanguageKey;
/**
Provides delegation methods to control the behavior of an `SPUUpdater` object.
*/
@protocol SPUUpdaterDelegate <NSObject>
NS_SWIFT_UI_ACTOR @protocol SPUUpdaterDelegate <NSObject>
@optional
/**
+1 -1
View File
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN
For updating updater settings, changes are made in the host's user defaults.
*/
SU_EXPORT @interface SPUUpdaterSettings : NSObject
SU_EXPORT NS_SWIFT_UI_ACTOR @interface SPUUpdaterSettings : NSObject
- (instancetype)init NS_UNAVAILABLE;
+4 -4
View File
@@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
Every method in this protocol can be assumed to be called from the main thread.
*/
SU_EXPORT @protocol SPUUserDriver <NSObject>
SU_EXPORT NS_SWIFT_UI_ACTOR @protocol SPUUserDriver <NSObject>
/**
* Show an updater permission request to the user
@@ -140,7 +140,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param error The error associated with why a new update was not found. See above discussion for more details.
* @param acknowledgement Acknowledge to the updater that no update found error was shown.
*/
- (void)showUpdateNotFoundWithError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdateNotFoundWithError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);
/**
* Show the user an update error occurred
@@ -153,7 +153,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param error The error associated with what update error occurred.
* @param acknowledgement Acknowledge to the updater that the error was shown.
*/
- (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdaterError:(NSError *)error acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);
/**
* Show the user that downloading the new update initiated
@@ -256,7 +256,7 @@ SU_EXPORT @protocol SPUUserDriver <NSObject>
* @param relaunched Indicates if the update was relaunched.
* @param acknowledgement Acknowledge to the updater that the finished installation was shown.
*/
- (void)showUpdateInstalledAndRelaunched:(BOOL)relaunched acknowledgement:(void (^)(void))acknowledgement;
- (void)showUpdateInstalledAndRelaunched:(BOOL)relaunched acknowledgement:(void (^)(void))acknowledgement NS_SWIFT_ASYNC(2);
/**
* Dismiss the current update installation
+1 -1
View File
@@ -62,7 +62,7 @@ typedef NS_ENUM(NSInteger, SPUUserUpdateStage) {
/**
This represents the user's current update state.
*/
SU_EXPORT @interface SPUUserUpdateState : NSObject
SU_EXPORT NS_SWIFT_SENDABLE @interface SPUUserUpdateState : NSObject<NSSecureCoding>
- (instancetype)init NS_UNAVAILABLE;
-3
View File
@@ -17,9 +17,6 @@
#define SPUUserUpdateStateMajorUpgradeKey @"SPUUserUpdateStateMajorUpgrade"
#define SPUUserUpdateStateCriticalUpdateKey @"SPUUserUpdateStateCriticalUpdate"
@interface SPUUserUpdateState () <NSSecureCoding>
@end
@implementation SPUUserUpdateState
@synthesize stage = _stage;
+1 -1
View File
@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
The appcast representing a collection of `SUAppcastItem` items in the feed.
*/
SU_EXPORT @interface SUAppcast : NSObject
SU_EXPORT NS_SWIFT_SENDABLE @interface SUAppcast : NSObject
- (instancetype)init NS_UNAVAILABLE;
+1 -1
View File
@@ -36,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
Extended documentation and examples on using appcast item features are available at:
https://sparkle-project.org/documentation/publishing/
*/
SU_EXPORT @interface SUAppcastItem : NSObject<NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SUAppcastItem : NSObject<NSSecureCoding>
/**
The version of the update item.
+1 -1
View File
@@ -23,7 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
/**
This class represents a response for permission to check updates.
*/
SU_EXPORT @interface SUUpdatePermissionResponse : NSObject<NSSecureCoding>
SU_EXPORT NS_SWIFT_SENDABLE @interface SUUpdatePermissionResponse : NSObject<NSSecureCoding>
/**
Initializes a new update permission response instance.