RLMInitialSubscriptionsConfiguration
Objective-C
@interface RLMInitialSubscriptionsConfiguration : NSObject
Swift
@_nonSendable(_assumed) class RLMInitialSubscriptionsConfiguration : NSObject, @unchecked Sendable
A configuration controlling how the initial subscriptions are populated when a Realm file is first opened.
See
RLMSubscriptionSet
-
A callback that’s executed in an update block to populate the initial subscriptions for that Realm.
This callback will only be executed when the Realm is first created, unless
rerunOnOpen
istrue
, in which case it will be executed every time the Realm is opened.Declaration
Objective-C
@property (nonatomic, readonly) RLMFlexibleSyncInitialSubscriptionsBlock _Nonnull callback;
Swift
var callback: RLMFlexibleSyncInitialSubscriptionsBlock { get }
-
Controls whether to re-run the
callback
every time the Realm is opened.Declaration
Objective-C
@property (nonatomic, readonly) BOOL rerunOnOpen;
Swift
var rerunOnOpen: Bool { get }
-
Create a new initial subscriptions configuration.
Declaration
Objective-C
- (nonnull instancetype) initWithCallback:(nonnull RLMFlexibleSyncInitialSubscriptionsBlock)callback rerunOnOpen:(BOOL)rerunOnOpen;
Swift
init(callback: @escaping RLMFlexibleSyncInitialSubscriptionsBlock, rerunOnOpen: Bool)
Parameters
callback
Callback that will be invoked to update the subscriptions for this Realm file when it’s first created or every time it’s opened if
rerunOnOpen
istrue
.rerunOnOpen
A flag controlling whether to run the subscription callback every time the Realm is opened or only the first time.
-
Create a new initial subscriptions configuration.
Declaration
Objective-C
- (nonnull instancetype)initWithCallback: (nonnull RLMFlexibleSyncInitialSubscriptionsBlock)callback;
Swift
init(callback: @escaping RLMFlexibleSyncInitialSubscriptionsBlock)
Parameters
callback
Callback that will be invoked to update the subscriptions for this Realm file when it’s first created.