RLMSyncSubscription
Objective-C
@interface RLMSyncSubscription : NSObject
Swift
@_nonSendable(_assumed) class RLMSyncSubscription : NSObject
RLMSyncSubscription
is used to define a Flexible Sync subscription obtained from querying a
subscription set, which can be used to read or remove/update a committed subscription.
-
Name of the subscription. If not specified it will return nil.
Declaration
Objective-C
@property (nonatomic, readonly, nullable) NSString *name;
Swift
var name: String? { get }
-
When the subscription was created. Recorded automatically.
Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull createdAt;
Swift
var createdAt: Date { get }
-
When the subscription was last updated. Recorded automatically.
Declaration
Objective-C
@property (nonatomic, readonly) NSDate *_Nonnull updatedAt;
Swift
var updatedAt: Date { get }
-
Updates a Flexible Sync’s subscription query with an allowed query which will be used to bootstrap data from the server when committed.
Warning
This method may only be called during a write subscription block.
Declaration
Objective-C
- (void)updateSubscriptionWhere:(nonnull NSString *)predicateFormat, ...;
Parameters
predicateFormat
A predicate format string, optionally followed by a variable number of arguments.
-
Updates a Flexible Sync’s subscription query with an allowed query which will be used to bootstrap data from the server when committed.
Warning
This method may only be called during a write subscription block.
Declaration
Objective-C
- (void)updateSubscriptionWithPredicate:(nonnull NSPredicate *)predicate;
Swift
func update(with predicate: NSPredicate)
Parameters
predicate
The predicate with which to filter the objects on the server.