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
-
guidA unique identifier for this object which should never ever (no really, I mean never) change. (Required)
property required method -
– expiredReturns 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.
-
– relationshipsToNotSerializeA list of relationships which should not be serialized. This is used when objects are being sent to the server.
-
– relationshipsToNotDeSerializeA 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 *guidDiscussion
A unique identifier for this object which should never ever (no really, I mean never) change. (Required)
Declared In
WHISyncableObject.hClass 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 *)mocDiscussion
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.hInstance Methods
expired
Returns true if an object has expired. Expired objects do not get synchronized.
- (BOOL)expiredDiscussion
Returns true if an object has expired. Expired objects do not get synchronized.
Declared In
WHISyncableObject.hrelationshipsToNotDeSerialize
A list of relationships which should not be deserialized. This is used when objects are received from the server.
- (NSArray *)relationshipsToNotDeSerializeReturn 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.hrelationshipsToNotSerialize
A list of relationships which should not be serialized. This is used when objects are being sent to the server.
- (NSArray *)relationshipsToNotSerializeReturn 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