WHISyncableObject Protocol Reference
Conforms to | NSObject |
Declared in | WHISyncableObject.h |
Overview
All objects that you want to synchronize must implement the WHISyncableObject protocol. The only required property of this protocol is the guid
property. Other methods enable you to customize the synchronization behavior. For example, if you want to prevent particular relationships from being serialized because they are not required to be transmitted, then you might implement the relationshipsToNotSerialize
method.
Large data, like images is not currently supported for automatic synchronization. For those, we recommend you store the images elsewhere, and then store URLs to access them in Wasabi Sync.
Tasks
-
guid
A unique identifier for this object which should never ever (no really, I mean never) change. (Required)
property required method -
– expired
Returns true if an object has expired. Expired objects do not get synchronized.
-
– setExpired:
Flags a given object as expired. Expired objects do not get synchronized.
-
– relationshipsToNotSerialize
A list of relationships which should not be serialized. This is used when objects are being sent to the server.
-
– relationshipsToNotDeSerialize
A list of relationships which should not be deserialized. This is used when objects are received from the server.
-
+ entityInManagedObjectContext:
This method returns the entity description for this entity type. The default will return an entity description matching the class name of the NSManagedObject.
Properties
guid
A unique identifier for this object which should never ever (no really, I mean never) change. (Required)
@property (nonatomic, strong) NSString *guid
Discussion
A unique identifier for this object which should never ever (no really, I mean never) change. (Required)
Declared In
WHISyncableObject.h
Class Methods
entityInManagedObjectContext:
This method returns the entity description for this entity type. The default will return an entity description matching the class name of the NSManagedObject.
+ (NSEntityDescription *)entityInManagedObjectContext:(NSManagedObjectContext *)moc
Discussion
This method returns the entity description for this entity type. The default will return an entity description matching the class name of the NSManagedObject.
Declared In
WHISyncableObject.h
Instance Methods
expired
Returns true if an object has expired. Expired objects do not get synchronized.
- (BOOL)expired
Discussion
Returns true if an object has expired. Expired objects do not get synchronized.
Declared In
WHISyncableObject.h
relationshipsToNotDeSerialize
A list of relationships which should not be deserialized. This is used when objects are received from the server.
- (NSArray *)relationshipsToNotDeSerialize
Return Value
An array of names (strings) which correspond to the names of relationships which should not be deserialized.
Discussion
A list of relationships which should not be deserialized. This is used when objects are received from the server.
Declared In
WHISyncableObject.h
relationshipsToNotSerialize
A list of relationships which should not be serialized. This is used when objects are being sent to the server.
- (NSArray *)relationshipsToNotSerialize
Return Value
An array of names (strings) which correspond to the names of relationships which should not be serialized.
Discussion
A list of relationships which should not be serialized. This is used when objects are being sent to the server.
Declared In
WHISyncableObject.h