From 0ac6b312dca4add281b767a178f6dd948fdebda3 Mon Sep 17 00:00:00 2001 From: Marat Al Date: Fri, 23 Aug 2024 12:40:52 +0200 Subject: [PATCH] I've added `NS_SWIFT_SENDABLE` to every type that has a docstring and their accompanied enums and params types. --- .../PrivateHeaders/Ably/ARTAttachRequestParams.h | 1 + .../Ably/ARTChannelStateChangeParams.h | 1 + .../Ably/ARTConnectionStateChangeParams.h | 1 + Source/PrivateHeaders/Ably/ARTTestClientOptions.h | 1 + Source/include/Ably/ARTAuth.h | 1 + Source/include/Ably/ARTAuthDetails.h | 1 + Source/include/Ably/ARTAuthOptions.h | 1 + Source/include/Ably/ARTChannel.h | 1 + Source/include/Ably/ARTChannelOptions.h | 1 + Source/include/Ably/ARTChannels.h | 1 + Source/include/Ably/ARTClientOptions.h | 1 + Source/include/Ably/ARTConnection.h | 1 + Source/include/Ably/ARTConnectionDetails.h | 1 + Source/include/Ably/ARTDataQuery.h | 3 +++ Source/include/Ably/ARTDeviceDetails.h | 1 + .../include/Ably/ARTDeviceIdentityTokenDetails.h | 1 + Source/include/Ably/ARTDevicePushDetails.h | 1 + Source/include/Ably/ARTEventEmitter.h | 2 ++ Source/include/Ably/ARTHTTPPaginatedResponse.h | 1 + Source/include/Ably/ARTLocalDevice.h | 1 + Source/include/Ably/ARTMessage.h | 1 + Source/include/Ably/ARTPaginatedResult.h | 1 + Source/include/Ably/ARTPresence.h | 1 + Source/include/Ably/ARTPresenceMessage.h | 2 ++ Source/include/Ably/ARTPush.h | 1 + Source/include/Ably/ARTPushAdmin.h | 1 + Source/include/Ably/ARTPushChannel.h | 1 + Source/include/Ably/ARTPushChannelSubscription.h | 1 + Source/include/Ably/ARTPushChannelSubscriptions.h | 1 + Source/include/Ably/ARTPushDeviceRegistrations.h | 1 + Source/include/Ably/ARTRealtime.h | 1 + Source/include/Ably/ARTRealtimeChannel.h | 1 + Source/include/Ably/ARTRealtimeChannelOptions.h | 2 ++ Source/include/Ably/ARTRealtimePresence.h | 2 ++ Source/include/Ably/ARTRest.h | 1 + Source/include/Ably/ARTRestChannel.h | 1 + Source/include/Ably/ARTRestPresence.h | 2 ++ Source/include/Ably/ARTStats.h | 10 ++++++++++ Source/include/Ably/ARTStatus.h | 3 +++ Source/include/Ably/ARTTokenDetails.h | 1 + Source/include/Ably/ARTTokenParams.h | 1 + Source/include/Ably/ARTTokenRequest.h | 1 + Source/include/Ably/ARTTypes.h | 15 +++++++++++++++ 43 files changed, 75 insertions(+) diff --git a/Source/PrivateHeaders/Ably/ARTAttachRequestParams.h b/Source/PrivateHeaders/Ably/ARTAttachRequestParams.h index 2fe6bf65f..c0026497b 100644 --- a/Source/PrivateHeaders/Ably/ARTAttachRequestParams.h +++ b/Source/PrivateHeaders/Ably/ARTAttachRequestParams.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** Provides parameters for a request to perform an operation that may ultimately call `ARTChannelRealtimeInternal`’s `internalAttach:callback:` method. */ +NS_SWIFT_SENDABLE NS_SWIFT_NAME(AttachRequestParams) @interface ARTAttachRequestParams: NSObject diff --git a/Source/PrivateHeaders/Ably/ARTChannelStateChangeParams.h b/Source/PrivateHeaders/Ably/ARTChannelStateChangeParams.h index 3e3171d30..4e7f6e3a7 100644 --- a/Source/PrivateHeaders/Ably/ARTChannelStateChangeParams.h +++ b/Source/PrivateHeaders/Ably/ARTChannelStateChangeParams.h @@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN `ARTRealtimeChannelInternal` will incorporate some of this data into the `ARTChannelStateChange` object that it emits as a result of the connection state change. */ +NS_SWIFT_SENDABLE NS_SWIFT_NAME(ChannelStateChangeParams) @interface ARTChannelStateChangeParams: NSObject diff --git a/Source/PrivateHeaders/Ably/ARTConnectionStateChangeParams.h b/Source/PrivateHeaders/Ably/ARTConnectionStateChangeParams.h index c38654d2b..8e5bd7202 100644 --- a/Source/PrivateHeaders/Ably/ARTConnectionStateChangeParams.h +++ b/Source/PrivateHeaders/Ably/ARTConnectionStateChangeParams.h @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN `ARTRealtimeInternal` will incorporate this data into the `ARTConnectionStateChange` object that it emits as a result of the connection state change. */ +NS_SWIFT_SENDABLE NS_SWIFT_NAME(ConnectionStateChangeParams) @interface ARTConnectionStateChangeParams: NSObject diff --git a/Source/PrivateHeaders/Ably/ARTTestClientOptions.h b/Source/PrivateHeaders/Ably/ARTTestClientOptions.h index 1b4462032..d66a79cd4 100644 --- a/Source/PrivateHeaders/Ably/ARTTestClientOptions.h +++ b/Source/PrivateHeaders/Ably/ARTTestClientOptions.h @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN This is for anything that test code wishes to be able to configure but which should not be part of the public API of these classes. */ +NS_SWIFT_SENDABLE @interface ARTTestClientOptions: NSObject /** diff --git a/Source/include/Ably/ARTAuth.h b/Source/include/Ably/ARTAuth.h index 3f1b8f35e..b7195c59b 100644 --- a/Source/include/Ably/ARTAuth.h +++ b/Source/include/Ably/ARTAuth.h @@ -88,6 +88,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTAuthProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTAuth : NSObject @end diff --git a/Source/include/Ably/ARTAuthDetails.h b/Source/include/Ably/ARTAuthDetails.h index 46ee9d7df..6886334ad 100644 --- a/Source/include/Ably/ARTAuthDetails.h +++ b/Source/include/Ably/ARTAuthDetails.h @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the token string used to authenticate a client with Ably. */ +NS_SWIFT_SENDABLE @interface ARTAuthDetails : NSObject /** diff --git a/Source/include/Ably/ARTAuthOptions.h b/Source/include/Ably/ARTAuthOptions.h index 511de7fb2..3461e9d2e 100644 --- a/Source/include/Ably/ARTAuthOptions.h +++ b/Source/include/Ably/ARTAuthOptions.h @@ -18,6 +18,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Passes authentication-specific properties in authentication requests to Ably. Properties set using `ARTAuthOptions` are used instead of the default values set when the client library is instantiated, as opposed to being merged with them. */ +NS_SWIFT_SENDABLE @interface ARTAuthOptions : NSObject /** diff --git a/Source/include/Ably/ARTChannel.h b/Source/include/Ably/ARTChannel.h index fbd6393da..cb063f557 100644 --- a/Source/include/Ably/ARTChannel.h +++ b/Source/include/Ably/ARTChannel.h @@ -79,6 +79,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTChannelProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTChannel : NSObject /// :nodoc: diff --git a/Source/include/Ably/ARTChannelOptions.h b/Source/include/Ably/ARTChannelOptions.h index f7028d517..a66b64d7b 100644 --- a/Source/include/Ably/ARTChannelOptions.h +++ b/Source/include/Ably/ARTChannelOptions.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Passes additional properties to an `ARTRestChannel` object, such as encryption. */ +NS_SWIFT_SENDABLE @interface ARTChannelOptions : NSObject /** diff --git a/Source/include/Ably/ARTChannels.h b/Source/include/Ably/ARTChannels.h index 03ac7bbba..bc0d3610d 100644 --- a/Source/include/Ably/ARTChannels.h +++ b/Source/include/Ably/ARTChannels.h @@ -7,6 +7,7 @@ /** * Creates and destroys `ARTRestChannel` and `ARTRealtimeChannel` objects. */ +NS_SWIFT_SENDABLE @interface ARTChannels : NSObject /** diff --git a/Source/include/Ably/ARTClientOptions.h b/Source/include/Ably/ARTClientOptions.h index 572983a6c..59a4e6749 100644 --- a/Source/include/Ably/ARTClientOptions.h +++ b/Source/include/Ably/ARTClientOptions.h @@ -12,6 +12,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Passes additional client-specific properties to the REST `-[ARTRestProtocol initWithOptions:]` or the Realtime `-[ARTRealtimeProtocol initWithOptions:]`. */ +NS_SWIFT_SENDABLE @interface ARTClientOptions : ARTAuthOptions /** diff --git a/Source/include/Ably/ARTConnection.h b/Source/include/Ably/ARTConnection.h index aa25e2f56..ac61a970d 100644 --- a/Source/include/Ably/ARTConnection.h +++ b/Source/include/Ably/ARTConnection.h @@ -80,6 +80,7 @@ ART_EMBED_INTERFACE_EVENT_EMITTER(ARTRealtimeConnectionEvent, ARTConnectionState * * @see See `ARTConnectionProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTConnection: NSObject @end diff --git a/Source/include/Ably/ARTConnectionDetails.h b/Source/include/Ably/ARTConnectionDetails.h index 7121ebd60..61b798e30 100644 --- a/Source/include/Ably/ARTConnectionDetails.h +++ b/Source/include/Ably/ARTConnectionDetails.h @@ -5,6 +5,7 @@ /** * Contains any constraints a client should adhere to and provides additional metadata about a `ARTConnection`, such as if a request to `-[ARTChannelProtocol publish:callback:]` a message that exceeds the maximum message size should be rejected immediately without communicating with Ably. */ +NS_SWIFT_SENDABLE @interface ARTConnectionDetails : NSObject NS_ASSUME_NONNULL_BEGIN diff --git a/Source/include/Ably/ARTDataQuery.h b/Source/include/Ably/ARTDataQuery.h index 6f9d8ccbd..78034fc83 100755 --- a/Source/include/Ably/ARTDataQuery.h +++ b/Source/include/Ably/ARTDataQuery.h @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTQueryDirection) { ARTQueryDirectionForwards, ARTQueryDirectionBackwards @@ -13,6 +14,7 @@ typedef NS_ENUM(NSUInteger, ARTQueryDirection) { /** This object is used for providing parameters into methods with paginated results. */ +NS_SWIFT_SENDABLE @interface ARTDataQuery : NSObject /** @@ -40,6 +42,7 @@ typedef NS_ENUM(NSUInteger, ARTQueryDirection) { /** This object is used for providing parameters into `ARTRealtimePresence`'s methods with paginated results. */ +NS_SWIFT_SENDABLE @interface ARTRealtimeHistoryQuery : ARTDataQuery /** diff --git a/Source/include/Ably/ARTDeviceDetails.h b/Source/include/Ably/ARTDeviceDetails.h index b996fc99c..798d43252 100644 --- a/Source/include/Ably/ARTDeviceDetails.h +++ b/Source/include/Ably/ARTDeviceDetails.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the properties of a device registered for push notifications. */ +NS_SWIFT_SENDABLE @interface ARTDeviceDetails : NSObject /** diff --git a/Source/include/Ably/ARTDeviceIdentityTokenDetails.h b/Source/include/Ably/ARTDeviceIdentityTokenDetails.h index 5e2463dd3..00ea3b6bf 100644 --- a/Source/include/Ably/ARTDeviceIdentityTokenDetails.h +++ b/Source/include/Ably/ARTDeviceIdentityTokenDetails.h @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN /** * An object representing a unique device identity token used to communicate with APNS. */ +NS_SWIFT_SENDABLE @interface ARTDeviceIdentityTokenDetails : NSObject /** diff --git a/Source/include/Ably/ARTDevicePushDetails.h b/Source/include/Ably/ARTDevicePushDetails.h index 3822cd595..0b2297f57 100644 --- a/Source/include/Ably/ARTDevicePushDetails.h +++ b/Source/include/Ably/ARTDevicePushDetails.h @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the details of the push registration of a device. */ +NS_SWIFT_SENDABLE @interface ARTDevicePushDetails : NSObject /** diff --git a/Source/include/Ably/ARTEventEmitter.h b/Source/include/Ably/ARTEventEmitter.h index d6d20a293..ea20e2fc8 100644 --- a/Source/include/Ably/ARTEventEmitter.h +++ b/Source/include/Ably/ARTEventEmitter.h @@ -23,12 +23,14 @@ NS_ASSUME_NONNULL_BEGIN /** An object representing a listener returned by `ARTEventEmitter` methods. */ +NS_SWIFT_SENDABLE @interface ARTEventListener : NSObject @end /** * A generic interface for event registration and delivery used in a number of the types in the Realtime client library. For example, the `ARTConnection` and `ARTRealtimeChannel` objects emit events for their state using the `ARTEventEmitter` pattern. */ +NS_SWIFT_SENDABLE @interface ARTEventEmitter, ItemType> : NSObject /// :nodoc: diff --git a/Source/include/Ably/ARTHTTPPaginatedResponse.h b/Source/include/Ably/ARTHTTPPaginatedResponse.h index 25ddbcae9..dded73d0b 100644 --- a/Source/include/Ably/ARTHTTPPaginatedResponse.h +++ b/Source/include/Ably/ARTHTTPPaginatedResponse.h @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /** * A superset of `ARTPaginatedResult` which represents a page of results plus metadata indicating the relative queries available to it. `ARTHttpPaginatedResponse` additionally carries information about the response to an HTTP request. */ +NS_SWIFT_SENDABLE @interface ARTHTTPPaginatedResponse : ARTPaginatedResult /** diff --git a/Source/include/Ably/ARTLocalDevice.h b/Source/include/Ably/ARTLocalDevice.h index 25ef79639..a5d11ab7e 100644 --- a/Source/include/Ably/ARTLocalDevice.h +++ b/Source/include/Ably/ARTLocalDevice.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the device identity token and secret of a device. `ARTLocalDevice` extends `ARTDeviceDetails`. */ +NS_SWIFT_SENDABLE @interface ARTLocalDevice : ARTDeviceDetails /** diff --git a/Source/include/Ably/ARTMessage.h b/Source/include/Ably/ARTMessage.h index 88d145170..7c05338d8 100644 --- a/Source/include/Ably/ARTMessage.h +++ b/Source/include/Ably/ARTMessage.h @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains an individual message that is sent to, or received from, Ably. */ +NS_SWIFT_SENDABLE @interface ARTMessage : ARTBaseMessage /// The event name, if available diff --git a/Source/include/Ably/ARTPaginatedResult.h b/Source/include/Ably/ARTPaginatedResult.h index f215f6c6f..a5b73561f 100644 --- a/Source/include/Ably/ARTPaginatedResult.h +++ b/Source/include/Ably/ARTPaginatedResult.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains a page of results for message or presence history, stats, or REST presence requests. An `ARTPaginatedResult` response from a REST API paginated query is also accompanied by metadata that indicates the relative queries available to the `ARTPaginatedResult` object. */ +NS_SWIFT_SENDABLE @interface ARTPaginatedResult : NSObject /** diff --git a/Source/include/Ably/ARTPresence.h b/Source/include/Ably/ARTPresence.h index e3589105d..8b3b4c88d 100644 --- a/Source/include/Ably/ARTPresence.h +++ b/Source/include/Ably/ARTPresence.h @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /// :nodoc: +NS_SWIFT_SENDABLE @interface ARTPresence : NSObject - (void)history:(ARTPaginatedPresenceCallback)callback; diff --git a/Source/include/Ably/ARTPresenceMessage.h b/Source/include/Ably/ARTPresenceMessage.h index a97411136..c730c6667 100644 --- a/Source/include/Ably/ARTPresenceMessage.h +++ b/Source/include/Ably/ARTPresenceMessage.h @@ -4,6 +4,7 @@ /** * Describes the possible actions members in the presence set can emit. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTPresenceAction) { /** * A member is not present in the channel. @@ -35,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains an individual presence update sent to, or received from, Ably. */ +NS_SWIFT_SENDABLE @interface ARTPresenceMessage : ARTBaseMessage /** diff --git a/Source/include/Ably/ARTPush.h b/Source/include/Ably/ARTPush.h index 81b414995..fd5154d0c 100644 --- a/Source/include/Ably/ARTPush.h +++ b/Source/include/Ably/ARTPush.h @@ -111,6 +111,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Enables a device to be registered and deregistered from receiving push notifications. */ +NS_SWIFT_SENDABLE @interface ARTPush : NSObject /** diff --git a/Source/include/Ably/ARTPushAdmin.h b/Source/include/Ably/ARTPushAdmin.h index 27af1a2f4..2c0d724e4 100644 --- a/Source/include/Ably/ARTPushAdmin.h +++ b/Source/include/Ably/ARTPushAdmin.h @@ -27,6 +27,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Enables the management of device registrations and push notification subscriptions. Also enables the publishing of push notifications to devices. */ +NS_SWIFT_SENDABLE @interface ARTPushAdmin : NSObject /** diff --git a/Source/include/Ably/ARTPushChannel.h b/Source/include/Ably/ARTPushChannel.h index ce2551ea0..c6070c46c 100644 --- a/Source/include/Ably/ARTPushChannel.h +++ b/Source/include/Ably/ARTPushChannel.h @@ -83,6 +83,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTPushChannelProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTPushChannel : NSObject @end diff --git a/Source/include/Ably/ARTPushChannelSubscription.h b/Source/include/Ably/ARTPushChannelSubscription.h index eb89e72a2..9c0f06273 100644 --- a/Source/include/Ably/ARTPushChannelSubscription.h +++ b/Source/include/Ably/ARTPushChannelSubscription.h @@ -5,6 +5,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the subscriptions of a device, or a group of devices sharing the same `clientId`, has to a channel in order to receive push notifications. */ +NS_SWIFT_SENDABLE @interface ARTPushChannelSubscription : NSObject /** diff --git a/Source/include/Ably/ARTPushChannelSubscriptions.h b/Source/include/Ably/ARTPushChannelSubscriptions.h index af06f0f08..eeeda92d6 100644 --- a/Source/include/Ably/ARTPushChannelSubscriptions.h +++ b/Source/include/Ably/ARTPushChannelSubscriptions.h @@ -62,6 +62,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTPushChannelSubscriptionsProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTPushChannelSubscriptions : NSObject @end diff --git a/Source/include/Ably/ARTPushDeviceRegistrations.h b/Source/include/Ably/ARTPushDeviceRegistrations.h index 1738b9863..29fb1ae86 100644 --- a/Source/include/Ably/ARTPushDeviceRegistrations.h +++ b/Source/include/Ably/ARTPushDeviceRegistrations.h @@ -61,6 +61,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTPushDeviceRegistrationsProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTPushDeviceRegistrations : NSObject @end diff --git a/Source/include/Ably/ARTRealtime.h b/Source/include/Ably/ARTRealtime.h index fbf87b8b8..1eb23fd1b 100644 --- a/Source/include/Ably/ARTRealtime.h +++ b/Source/include/Ably/ARTRealtime.h @@ -104,6 +104,7 @@ NS_ASSUME_NONNULL_BEGIN /** * A client that extends the functionality of the `ARTRest` and provides additional realtime-specific features. */ +NS_SWIFT_SENDABLE @interface ARTRealtime : NSObject /** diff --git a/Source/include/Ably/ARTRealtimeChannel.h b/Source/include/Ably/ARTRealtimeChannel.h index 6a153d8aa..baad506ab 100644 --- a/Source/include/Ably/ARTRealtimeChannel.h +++ b/Source/include/Ably/ARTRealtimeChannel.h @@ -149,6 +149,7 @@ ART_EMBED_INTERFACE_EVENT_EMITTER(ARTChannelEvent, ARTChannelStateChange *) * Enables messages to be published and subscribed to. Also enables historic messages to be retrieved and provides access to the `ARTRealtimePresence` object of a channel. * Also implements `ARTEventEmitter` interface and emits `ARTChannelEvent` events, where a `ARTChannelEvent` is either a `ARTRealtimeChannelState` or an `ARTChannelEvent.ARTChannelEventUpdate`. */ +NS_SWIFT_SENDABLE @interface ARTRealtimeChannel : NSObject /** diff --git a/Source/include/Ably/ARTRealtimeChannelOptions.h b/Source/include/Ably/ARTRealtimeChannelOptions.h index 2e5618d12..af43dc8b6 100644 --- a/Source/include/Ably/ARTRealtimeChannelOptions.h +++ b/Source/include/Ably/ARTRealtimeChannelOptions.h @@ -5,6 +5,7 @@ /** * Describes the possible flags used to configure client capabilities, using `ARTChannelOptions`. */ +NS_SWIFT_SENDABLE typedef NS_OPTIONS(NSUInteger, ARTChannelMode) { /** * The client can enter the presence set. @@ -29,6 +30,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Passes additional properties to an `ARTRealtimeChannel` object, such as encryption, an `ARTChannelMode` and channel parameters. */ +NS_SWIFT_SENDABLE @interface ARTRealtimeChannelOptions : ARTChannelOptions /** diff --git a/Source/include/Ably/ARTRealtimePresence.h b/Source/include/Ably/ARTRealtimePresence.h index 6e22ef459..003916b2b 100644 --- a/Source/include/Ably/ARTRealtimePresence.h +++ b/Source/include/Ably/ARTRealtimePresence.h @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN /** This object is used for providing parameters into `ARTRealtimePresence`'s methods with paginated results. */ +NS_SWIFT_SENDABLE @interface ARTRealtimePresenceQuery : ARTPresenceQuery /** @@ -217,6 +218,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTRealtimePresenceProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTRealtimePresence : ARTPresence @end diff --git a/Source/include/Ably/ARTRest.h b/Source/include/Ably/ARTRest.h index ca9dbd0de..f1235a3d2 100644 --- a/Source/include/Ably/ARTRest.h +++ b/Source/include/Ably/ARTRest.h @@ -99,6 +99,7 @@ NS_ASSUME_NONNULL_BEGIN /** * A client that offers a simple stateless API to interact directly with Ably's REST API. */ +NS_SWIFT_SENDABLE @interface ARTRest : NSObject /** diff --git a/Source/include/Ably/ARTRestChannel.h b/Source/include/Ably/ARTRestChannel.h index 2c25a3a2e..941c52b80 100644 --- a/Source/include/Ably/ARTRestChannel.h +++ b/Source/include/Ably/ARTRestChannel.h @@ -46,6 +46,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Enables messages to be published and historic messages to be retrieved for a channel. */ +NS_SWIFT_SENDABLE @interface ARTRestChannel : NSObject /** diff --git a/Source/include/Ably/ARTRestPresence.h b/Source/include/Ably/ARTRestPresence.h index 0d24c00dc..83abb34c9 100644 --- a/Source/include/Ably/ARTRestPresence.h +++ b/Source/include/Ably/ARTRestPresence.h @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN /** This object is used for providing parameters into `ARTRestPresence`'s methods with paginated results. */ +NS_SWIFT_SENDABLE @interface ARTPresenceQuery : NSObject /** @@ -78,6 +79,7 @@ NS_ASSUME_NONNULL_BEGIN * * @see See `ARTRestPresenceProtocol` for details. */ +NS_SWIFT_SENDABLE @interface ARTRestPresence : ARTPresence @end diff --git a/Source/include/Ably/ARTStats.h b/Source/include/Ably/ARTStats.h index e05a5b342..d174178bd 100644 --- a/Source/include/Ably/ARTStats.h +++ b/Source/include/Ably/ARTStats.h @@ -7,6 +7,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Describes the interval unit over which statistics are gathered. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Interval unit over which statistics are gathered as minutes. @@ -29,6 +30,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** This object is used for providing parameters into `ARTStats`'s methods with paginated results. */ +NS_SWIFT_SENDABLE @interface ARTStatsQuery : ARTDataQuery /** @@ -41,6 +43,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains the aggregate counts for messages and data transferred. */ +NS_SWIFT_SENDABLE @interface ARTStatsMessageCount : NSObject /** @@ -68,6 +71,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains a breakdown of summary stats data for different (channel vs presence) message types. */ +NS_SWIFT_SENDABLE @interface ARTStatsMessageTypes : NSObject /** @@ -101,6 +105,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains a breakdown of summary stats data for traffic over various transport types. */ +NS_SWIFT_SENDABLE @interface ARTStatsMessageTraffic : NSObject /** @@ -140,6 +145,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains the aggregate data for usage of a resource in a specific scope. */ +NS_SWIFT_SENDABLE @interface ARTStatsResourceCount : NSObject /** @@ -185,6 +191,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains a breakdown of summary stats data for different (`TLS` vs non-`TLS`) connection types. */ +NS_SWIFT_SENDABLE @interface ARTStatsConnectionTypes : NSObject /** @@ -218,6 +225,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains the aggregate counts for requests made. */ +NS_SWIFT_SENDABLE @interface ARTStatsRequestCount : NSObject /** @@ -251,6 +259,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Details the stats on push notifications. */ +NS_SWIFT_SENDABLE @interface ARTStatsPushCount : NSObject /** @@ -302,6 +311,7 @@ typedef NS_ENUM(NSUInteger, ARTStatsGranularity) { /** * Contains application statistics for a specified time interval and time period. */ +NS_SWIFT_SENDABLE @interface ARTStats : NSObject /// :nodoc: diff --git a/Source/include/Ably/ARTStatus.h b/Source/include/Ably/ARTStatus.h index c36e83c8c..60bde777c 100644 --- a/Source/include/Ably/ARTStatus.h +++ b/Source/include/Ably/ARTStatus.h @@ -27,6 +27,7 @@ typedef NS_ENUM(NSUInteger, ARTState) { /** The list of all public error codes returned under the error domain ARTAblyErrorDomain */ +NS_SWIFT_SENDABLE typedef CF_ENUM(NSUInteger, ARTErrorCode) { ARTErrorNoError = 10000, ARTErrorBadRequest = 40000, @@ -189,6 +190,7 @@ FOUNDATION_EXPORT NSString *const ARTAblyMessageNoMeansToRenewToken; * * @see For possible `NSError.code` see Ably [error codes](https://github.com/ably/ably-common/blob/main/protocol/errors.json). */ +NS_SWIFT_SENDABLE @interface ARTErrorInfo : NSError /** @@ -257,6 +259,7 @@ FOUNDATION_EXPORT NSString *const ARTAblyMessageNoMeansToRenewToken; * :nodoc: TODO: docstring * An object representing a status of an operation. */ +NS_SWIFT_SENDABLE @interface ARTStatus : NSObject @property (nullable, readonly, nonatomic) ARTErrorInfo *errorInfo; diff --git a/Source/include/Ably/ARTTokenDetails.h b/Source/include/Ably/ARTTokenDetails.h index 316d6e52c..e8a1220f0 100644 --- a/Source/include/Ably/ARTTokenDetails.h +++ b/Source/include/Ably/ARTTokenDetails.h @@ -8,6 +8,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains an Ably Token and its associated metadata. */ +NS_SWIFT_SENDABLE @interface ARTTokenDetails : NSObject /** diff --git a/Source/include/Ably/ARTTokenParams.h b/Source/include/Ably/ARTTokenParams.h index a7877268c..0cdf264dd 100644 --- a/Source/include/Ably/ARTTokenParams.h +++ b/Source/include/Ably/ARTTokenParams.h @@ -10,6 +10,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Defines the properties of an Ably Token. */ +NS_SWIFT_SENDABLE @interface ARTTokenParams : NSObject /** diff --git a/Source/include/Ably/ARTTokenRequest.h b/Source/include/Ably/ARTTokenRequest.h index 853783f87..4793694b0 100644 --- a/Source/include/Ably/ARTTokenRequest.h +++ b/Source/include/Ably/ARTTokenRequest.h @@ -9,6 +9,7 @@ NS_ASSUME_NONNULL_BEGIN /** * Contains the properties of a request for a token to Ably. Tokens are generated using `-[ARTAuthProtocol requestToken:]`. */ +NS_SWIFT_SENDABLE @interface ARTTokenRequest : NSObject /** diff --git a/Source/include/Ably/ARTTypes.h b/Source/include/Ably/ARTTypes.h index afdcda17a..3c40d6dc1 100644 --- a/Source/include/Ably/ARTTypes.h +++ b/Source/include/Ably/ARTTypes.h @@ -34,6 +34,7 @@ typedef NSData ARTDeviceToken; typedef ARTJsonObject ARTPushRecipient; /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTAuthentication) { ARTAuthenticationOff, ARTAuthenticationOn, @@ -43,6 +44,7 @@ typedef NS_ENUM(NSUInteger, ARTAuthentication) { }; /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTAuthMethod) { ARTAuthMethodBasic, ARTAuthMethodToken @@ -51,6 +53,7 @@ typedef NS_ENUM(NSUInteger, ARTAuthMethod) { /** * Describes the realtime `ARTConnection` object states. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTRealtimeConnectionState) { /** * A connection with this state has been initialized but no connection has yet been attempted. @@ -92,6 +95,7 @@ NSString *_Nonnull ARTRealtimeConnectionStateToStr(ARTRealtimeConnectionState st /** * Describes the events emitted by a `ARTConnection` object. An event is either an `ARTRealtimeConnectionEventUpdate` or an `ARTRealtimeConnectionState`. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTRealtimeConnectionEvent) { ARTRealtimeConnectionEventInitialized, ARTRealtimeConnectionEventConnecting, @@ -113,6 +117,7 @@ NSString *_Nonnull ARTRealtimeConnectionEventToStr(ARTRealtimeConnectionEvent ev /** * Describes the possible states of an `ARTRealtimeChannel` object. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTRealtimeChannelState) { /** * The channel has been initialized but no attach has yet been attempted. @@ -150,6 +155,7 @@ NSString *_Nonnull ARTRealtimeChannelStateToStr(ARTRealtimeChannelState state); /** * Describes the events emitted by an `ARTRealtimeChannel` object. An event is either an `ARTChannelEventUpdate` or a `ARTRealtimeChannelState`. */ +NS_SWIFT_SENDABLE typedef NS_ENUM(NSUInteger, ARTChannelEvent) { ARTChannelEventInitialized, ARTChannelEventAttaching, @@ -169,6 +175,7 @@ NSString *_Nonnull ARTChannelEventToStr(ARTChannelEvent event); /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSInteger, ARTDataQueryError) { ARTDataQueryErrorLimit = 1, ARTDataQueryErrorTimestampRange = 2, @@ -178,11 +185,13 @@ typedef NS_ENUM(NSInteger, ARTDataQueryError) { }; /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSInteger, ARTRealtimeHistoryError) { ARTRealtimeHistoryErrorNotAttached = ARTDataQueryErrorTimestampRange + 1 }; /// :nodoc: +NS_SWIFT_SENDABLE typedef NS_ENUM(NSInteger, ARTCustomRequestError) { ARTCustomRequestErrorInvalidMethod = 1, ARTCustomRequestErrorInvalidBody = 2, @@ -221,6 +230,7 @@ NSString *generateNonce(void); /** * Contains `ARTRealtimeConnectionState` change information emitted by the `ARTConnection` object. */ +NS_SWIFT_SENDABLE @interface ARTConnectionStateChange : NSObject /// :nodoc: @@ -264,6 +274,7 @@ NSString *generateNonce(void); /** * Contains state change information emitted by an `ARTRealtimeChannel` object. */ +NS_SWIFT_SENDABLE @interface ARTChannelStateChange : NSObject /// :nodoc: @@ -309,6 +320,7 @@ NSString *generateNonce(void); /** * Contains the metrics associated with a `ARTRestChannel` or `ARTRealtimeChannel`, such as the number of publishers, subscribers and connections it has. */ +NS_SWIFT_SENDABLE @interface ARTChannelMetrics : NSObject /** @@ -354,6 +366,7 @@ NSString *generateNonce(void); /** * Contains the metrics of a `ARTRestChannel` or `ARTRealtimeChannel` object. */ +NS_SWIFT_SENDABLE @interface ARTChannelOccupancy : NSObject /** @@ -369,6 +382,7 @@ NSString *generateNonce(void); /** * Contains the status of a `ARTRestChannel` or `ARTRealtimeChannel` object such as whether it is active and its `ARTChannelOccupancy`. */ +NS_SWIFT_SENDABLE @interface ARTChannelStatus : NSObject /** @@ -389,6 +403,7 @@ NSString *generateNonce(void); /** * Contains the details of a `ARTRestChannel` or `ARTRealtimeChannel` object such as its ID and `ARTChannelStatus`. */ +NS_SWIFT_SENDABLE @interface ARTChannelDetails : NSObject /**