RLMSyncPermissionOffer
@interface RLMSyncPermissionOffer : RLMObject
This model is used for offering permission changes to other users.
It should be used in conjunction with an RLMSyncUser
’s management Realm.
See https://realm.io/docs/realm-object-server/#permissions for general documentation.
-
The globally unique ID string of this permission offer object.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull id;
Swift
var id: String { get }
-
The date this object was initially created.
Declaration
Objective-C
@property (readonly, atomic) NSDate *_Nonnull createdAt;
Swift
var createdAt: Date { get }
-
The date this object was last modified.
Declaration
Objective-C
@property (readonly, atomic) NSDate *_Nonnull updatedAt;
Swift
var updatedAt: Date { get }
-
The status code of the object that was processed by Realm Object Server.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSNumber<RLMInt> *statusCode;
Swift
var statusCode: NSNumber? { get }
-
An error or informational message, typically written to by the Realm Object Server.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSString *statusMessage;
Swift
var statusMessage: String? { get }
-
Sync management object status.
Declaration
Objective-C
@property (readonly, atomic) RLMSyncManagementObjectStatus status;
Swift
var status: Int32 { get }
-
A token which uniquely identifies this offer. Generated by the server.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSString *token;
Swift
var token: String? { get }
-
The remote URL to the realm.
Declaration
Objective-C
@property (readonly, atomic) NSString *_Nonnull realmUrl;
Swift
var realmUrl: String { get }
-
Whether this offer allows the receiver to read from the Realm.
Declaration
Objective-C
@property (readonly, atomic) BOOL mayRead;
Swift
var mayRead: Bool { get }
-
Whether this offer allows the receiver to write to the Realm.
Declaration
Objective-C
@property (readonly, atomic) BOOL mayWrite;
Swift
var mayWrite: Bool { get }
-
Whether this offer allows the receiver to manage the access rights for others.
Declaration
Objective-C
@property (readonly, atomic) BOOL mayManage;
Swift
var mayManage: Bool { get }
-
When this token will expire and become invalid.
Declaration
Objective-C
@property (readonly, atomic, nullable) NSDate *expiresAt;
Swift
var expiresAt: Date? { get }
-
Construct a permission offer object used to offer permission changes to other users.
Declaration
Objective-C
+ (nonnull instancetype)permissionOfferWithRealmURL:(nonnull NSString *)realmURL expiresAt:(nullable NSDate *)expiresAt read:(BOOL)mayRead write:(BOOL)mayWrite manage:(BOOL)mayManage;
Swift
convenience init(realmURL: String, expiresAt: Date?, read mayRead: Bool, write mayWrite: Bool, manage mayManage: Bool)
Parameters
realmURL
The URL to the Realm on which to apply these permission changes to, once the offer is accepted.
expiresAt
When this token will expire and become invalid. Pass
nil
if this offer should not expire.mayRead
Grant or revoke read access.
mayWrite
Grant or revoked read-write access.
mayManage
Grant or revoke administrative access.