RLMCompensatingWriteInfo

Objective-C


@interface RLMCompensatingWriteInfo : NSObject

Swift

class RLMCompensatingWriteInfo : NSObject, @unchecked Sendable

Extended information about a write which was rejected by the server.

The server will sometimes reject writes made by the client for reasons such as permissions, additional server-side validation failing, or because the object didn’t match any flexible sync subscriptions. When this happens, a RLMSyncErrorWriteRejected error is reported which contains an array of RLMCompensatingWriteInfo objects in the RLMCompensatingWriteInfoKey userInfo key with information about what writes were rejected and why.

This information is intended for debugging and logging purposes only. The reason strings are generated by the server and are not guaranteed to be stable, so attempting to programmatically do anything with them will break without warning.

  • The class name of the object being written to.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *objectType;

    Swift

    var objectType: String! { get }
  • The primary key of the object being written to.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<RLMValue> primaryKey;
  • A human-readable string describing why the write was rejected.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSString *reason;

    Swift

    var reason: String! { get }