|
LuxChat
2.0
Instant messenger for iOS
|
#import <PFObject.h>
Properties | |
| NSString * | parseClassName |
More... | |
| NSString * | objectId |
| NSDate * | updatedAt |
| NSDate * | createdAt |
| PFACL * | ACL |
| NSArray< NSString * > * | allKeys |
| BOOL | dataAvailable |
More... | |
| BOOL | dirty |
More... | |
The PFObject class is a local representation of data persisted to the Parse cloud. This is the main class that is used to interact with objects in your app.
| - (void) addObject: | (id) | object | |
| forKey: | (NSString *) | key | |
Adds an object to the end of the array associated with a given key.
| object | The object to add. |
| key | The key. |
| - (void) addObjectsFromArray: | (NSArray *) | objects | |
| forKey: | (NSString *) | key | |
Adds the objects contained in another array to the end of the array associated with a given key.
| objects | The array of objects to add. |
| key | The key. |
| - (void) addUniqueObject: | (id) | object | |
| forKey: | (NSString *) | key | |
Adds an object to the array associated with a given key, only if it is not already present in the array.
The position of the insert is not guaranteed.
| object | The object to add. |
| key | The key. |
| - (void) addUniqueObjectsFromArray: | (NSArray *) | objects | |
| forKey: | (NSString *) | key | |
Adds the objects contained in another array to the array associated with a given key, only adding elements which are not already present in the array.
The position of the insert is not guaranteed.
| objects | The array of objects to add. |
| key | The key. |
| - (BOOL) delete: | (NSError **) | error |
Synchronously* deletes the PFObject and sets an error if it occurs.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BOOL) deleteAll: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Synchronously* deletes a collection of objects all at once.
| objects | The array of objects to delete. |
Provided by category PFObject(Synchronous).
| + (BOOL) deleteAll: | (nullable NSArray< PFObject * > *) | objects | |
| error: | (NSError **) | error | |
Synchronously* deletes a collection of objects all at once and sets an error if necessary.
| objects | The array of objects to delete. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Deletes a collection of objects all at once asynchronously.
| objects | The array of objects to delete. |
| + (void) deleteAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFBooleanResultBlock) | block | |
Deletes a collection of objects all at once asynchronously and executes the block when done.
| objects | The array of objects to delete. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (void) deleteAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| target: | (nullable id) | target | |
| selector: | ("Please use `PFObject.+deleteAllInBackground:block:` instead.") | PARSE_DEPRECATED | |
Deletes a collection of objects all at once asynchronously and calls a callback when done.
| objects | The array of objects to delete. |
| target | The object to call selector on. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSNumber *)number error:(NSError *)error. error will be nil on success and set if there was an error. [result boolValue] will tell you whether the call succeeded or not. |
PFObject.+deleteAllInBackground:block: instead. Provided by category PFObject(Deprecated).
| - (BFTask<NSNumber *> *) deleteInBackground |
| - (void) deleteInBackgroundWithBlock: | (nullable PFBooleanResultBlock) | block |
Deletes the PFObject asynchronously and executes the given callback block.
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (void) deleteInBackgroundWithTarget: | (nullable id) | target | |
| selector: | ("Please use `PFObject.-deleteInBackgroundWithBlock:` instead.") | PARSE_DEPRECATED | |
Deletes the PFObject asynchronously and calls the given callback.
| target | The object to call selector on. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSNumber *)result error:(NSError *)error. error will be nil on success and set if there was an error. [result boolValue] will tell you whether the call succeeded or not. |
PFObject.-deleteInBackgroundWithBlock: instead. Provided by category PFObject(Deprecated).
| - (nullable instancetype) fetch: | (NSError **) | error |
Synchronously* fetches the PFObject with the current data from the server and sets an error if it occurs.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (nullable NSArray<__kindof PFObject *> *) fetchAll: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Synchronously* fetches all of the PFObject objects with the current data from the server.
| objects | The list of objects to fetch. |
Provided by category PFObject(Synchronous).
| + (nullable NSArray<__kindof PFObject *> *) fetchAll: | (nullable NSArray< PFObject * > *) | objects | |
| error: | (NSError **) | error | |
Synchronously* fetches all of the PFObject objects with the current data from the server and sets an error if it occurs.
| objects | The list of objects to fetch. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (nullable NSArray<__kindof PFObject *> *) fetchAllIfNeeded: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Synchronously* fetches all of the PFObject objects with the current data from the server.
| objects | The list of objects to fetch. |
Provided by category PFObject(Synchronous).
| + (nullable NSArray<__kindof PFObject *> *) fetchAllIfNeeded: | (nullable NSArray< PFObject * > *) | objects | |
| error: | (NSError **) | error | |
Synchronously* fetches all of the PFObject objects with the current data from the server and sets an error if it occurs.
| objects | The list of objects to fetch. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BFTask<NSArray<__kindof PFObject *> *> *) fetchAllIfNeededInBackground: | (nullable NSArray< PFObject * > *) | objects |
Fetches all of the PFObject objects with the current data from the server asynchronously.
| objects | The list of objects to fetch. |
| + (void) fetchAllIfNeededInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFArrayResultBlock) | block | |
Fetches all of the PFObjects with the current data from the server asynchronously and calls the given block.
| objects | The list of objects to fetch. |
| block | The block to execute. It should have the following argument signature: ^(NSArray *objects, NSError *error). |
| + (void) fetchAllIfNeededInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| target: | (nullable id) | target | |
| selector: | ("Please use `PFObject.+fetchAllIfNeededInBackground:block:` instead.") | PARSE_DEPRECATED | |
Fetches all of the PFObjects with the current data from the server asynchronously and calls the given callback.
| objects | The list of objects to fetch. |
| target | The target on which the selector will be called. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error. error will be nil on success and set if there was an error. fetchedObjects will the array of PFObject objects that were fetched. |
PFObject.+fetchAllIfNeededInBackground:block: instead. Provided by category PFObject(Deprecated).
| + (BFTask<NSArray<__kindof PFObject *> *> *) fetchAllInBackground: | (nullable NSArray< PFObject * > *) | objects |
Fetches all of the PFObject objects with the current data from the server asynchronously.
| objects | The list of objects to fetch. |
| + (void) fetchAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFArrayResultBlock) | block | |
Fetches all of the PFObject objects with the current data from the server asynchronously and calls the given block.
| objects | The list of objects to fetch. |
| block | The block to execute. It should have the following argument signature: ^(NSArray *objects, NSError *error). |
| + (void) fetchAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| target: | (nullable id) | target | |
| selector: | ("Please use `PFObject.+fetchAllInBackground:block:` instead.") | PARSE_DEPRECATED | |
Fetches all of the PFObject objects with the current data from the server asynchronously and calls the given callback.
| objects | The list of objects to fetch. |
| target | The target on which the selector will be called. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSArray *)fetchedObjects error:(NSError *)error. error will be nil on success and set if there was an error. fetchedObjects will the array of PFObject objects that were fetched. |
PFObject.+fetchAllInBackground:block: instead. Provided by category PFObject(Deprecated).
| - (nullable instancetype) fetchFromLocalDatastore: | (NSError **) | error |
Synchronously* loads data from the local datastore into this object, if it has not been fetched from the server already.
If the object is not stored in the local datastore, this error will be set to return kPFErrorCacheMiss.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Asynchronously* loads data from the local datastore into this object, if it has not been fetched from the server already.
| - (void) fetchFromLocalDatastoreInBackgroundWithBlock: | (nullable PFObjectResultBlock) | block |
Asynchronously* loads data from the local datastore into this object, if it has not been fetched from the server already.
| block | The block to execute. It should have the following argument signature: ^(PFObject *object, NSError *error). |
| - (nullable instancetype) fetchIfNeeded: | (NSError **) | error |
Synchronously* fetches the PFObject data from the server if dataAvailable is NO.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Fetches the PFObject data asynchronously if dataAvailable is NO, then sets it as a result for the task.
| - (void) fetchIfNeededInBackgroundWithBlock: | (nullable PFObjectResultBlock) | block |
| - (void) fetchIfNeededInBackgroundWithTarget: | (nullable id) | target | |
| selector: | ("Please use `PFObject.-fetchIfNeededInBackgroundWithBlock:` instead.") | PARSE_DEPRECATED | |
Fetches the PFObject's data asynchronously if dataAvailable is NO, then calls the callback.
| target | The target on which the selector will be called. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(PFObject *)fetchedObject error:(NSError *)error. error will be nil on success and set if there was an error. refreshedObject will be the PFObject with the refreshed data. |
PFObject.-fetchIfNeededInBackgroundWithBlock: instead. Provided by category PFObject(Deprecated).
Fetches the PFObject asynchronously and sets it as a result for the task.
| - (void) fetchInBackgroundWithBlock: | (nullable PFObjectResultBlock) | block |
| - (void) fetchInBackgroundWithTarget: | (nullable id) | target | |
| selector: | ("Please use `PFObject.-fetchInBackgroundWithBlock:` instead.") | PARSE_DEPRECATED | |
Fetches the `PFObject asynchronously and calls the given callback.
| target | The target on which the selector will be called. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error. error will be nil on success and set if there was an error. refreshedObject will be the PFObject with the refreshed data. |
PFObject.-fetchInBackgroundWithBlock: instead. Provided by category PFObject(Deprecated).
| - (void) incrementKey: | (NSString *) | key |
Increments the given key by 1.
| key | The key. |
| - (void) incrementKey: | (NSString *) | key | |
| byAmount: | (NSNumber *) | amount | |
Increments the given key by a number.
| key | The key. |
| amount | The amount to increment. |
| - (instancetype) initWithClassName: | (NSString *) | newClassName |
Initializes a new empty PFObject instance with a class name.
| newClassName | A class name can be any alphanumeric string that begins with a letter. It represents an object in your app, like a 'User' or a 'Document'. |
| - (BOOL) isDirtyForKey: | (NSString *) | key |
Get whether a value associated with a key has been added/updated/removed and not saved yet.
| key | The key to check for |
| - (nullable id) objectForKey: | (NSString *) | key |
Returns the value associated with a given key.
| key | The key for which to return the corresponding value. |
| - (nullable id) objectForKeyedSubscript: | (NSString *) | key |
Returns the value associated with a given key.
This method enables usage of literal syntax on PFObject. E.g. NSString *value = object[@"key"];
| key | The key for which to return the corresponding value. |
| + (instancetype) objectWithClassName: | (NSString *) | className |
Creates a new PFObject with a class name.
| className | A class name can be any alphanumeric string that begins with a letter. It represents an object in your app, like a 'User' or a 'Document'. |
| + (instancetype) objectWithClassName: | (NSString *) | className | |
| dictionary: | (nullable NSDictionary< NSString *, id > *) | dictionary | |
Creates a new PFObject with a class name, initialized with data constructed from the specified set of objects and keys.
| className | The object's class. |
| dictionary | An NSDictionary of keys and objects to set on the new PFObject. |
| + (instancetype) objectWithoutDataWithClassName: | (NSString *) | className | |
| objectId: | (init(withoutDataWithClassName:objectId:)) | NS_SWIFT_NAME | |
Creates a reference to an existing PFObject for use in creating associations between PFObjects.
Calling dataAvailable on this object will return NO until -fetchIfNeeded has been called. No network request will be made.
| className | The object's class. |
| objectId | The object id for the referenced object. |
PFObject instance without data. | - (BOOL) PF_SWIFT_UNAVAILABLE |
Synchronously* saves the PFObject.
Provided by category PFObject(Synchronous).
| - (nullable instancetype) PF_SWIFT_UNAVAILABLE |
Synchronously* fetches the PFObject with the current data from the server.
Provided by category PFObject(Synchronous).
| - (nullable instancetype) PF_SWIFT_UNAVAILABLE |
Synchronously* fetches the PFObject data from the server if dataAvailable is NO.
Provided by category PFObject(Synchronous).
| - (nullable instancetype) PF_SWIFT_UNAVAILABLE |
Synchronously* loads data from the local datastore into this object, if it has not been fetched from the server already.
Provided by category PFObject(Synchronous).
| - (BOOL) PF_SWIFT_UNAVAILABLE |
Synchronously* deletes the PFObject.
Provided by category PFObject(Synchronous).
| - (BOOL) PF_SWIFT_UNAVAILABLE |
Synchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
-unpin: PFObjectDefaultPin Provided by category PFObject(Synchronous).
| + (BOOL) PF_SWIFT_UNAVAILABLE |
Synchronously* removes all objects in the local datastore using a default pin name: PFObjectDefaultPin.
Provided by category PFObject(Synchronous).
| - (BOOL) PF_SWIFT_UNAVAILABLE |
Synchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
Provided by category PFObject(Synchronous).
| - (BFTask<NSNumber *> *) PF_WATCH_UNAVAILABLE |
Saves this object to the server at some unspecified time in the future, even if Parse is currently inaccessible.
Use this when you may not have a solid network connection, and don't need to know when the save completes. If there is some problem with the object such that it can't be saved, it will be silently discarded.
Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Objects saved this way will persist even after the app is closed, in which case they will be sent the next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to -saveEventually will cause old saves to be silently discarded until the connection can be re-established, and the queued objects can be saved.
| - (BFTask<NSNumber *> *) PF_WATCH_UNAVAILABLE |
Deletes this object from the server at some unspecified time in the future, even if Parse is currently inaccessible.
Use this when you may not have a solid network connection, and don't need to know when the delete completes. If there is some problem with the object such that it can't be deleted, the request will be silently discarded.
Delete instructions made with this method will be stored locally in an on-disk cache until they can be transmitted to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Delete requests will persist even after the app is closed, in which case they will be sent the next time the app is opened. If more than 10MB of -saveEventually or -deleteEventually commands are waiting to be sent, subsequent calls to -saveEventually or -deleteEventually will cause old requests to be silently discarded until the connection can be re-established, and the queued requests can go through.
| - (BOOL) pin: | (NSError **) | error |
Synchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
| error | Pointer to an NSError that will be set if necessary. |
-unpin: PFObjectDefaultPin Provided by category PFObject(Synchronous).
| + (BOOL) pinAll: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Synchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
Provided by category PFObject(Synchronous).
Synchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BOOL) pinAll: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | PF_SWIFT_UNAVAILABLE | |
Synchronously* stores the objects and every object they point to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| name | The name of the pin. |
Provided by category PFObject(Synchronous).
| + (BOOL) pinAll: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
| error: | (NSError **) | error | |
Synchronously* stores the objects and every object they point to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| name | The name of the pin. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Asynchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| + (void) pinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* stores the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (BFTask<NSNumber *> *) pinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
Asynchronously* stores the objects and every object they point to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| name | The name of the pin. |
| + (void) pinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* stores the objects and every object they point to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call fetchFromLocalDatastore: on it.
| objects | The objects to be pinned. |
| name | The name of the pin. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (BFTask<NSNumber *> *) pinInBackground |
Asynchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
-unpinInBackground PFObjectDefaultPin | - (void) pinInBackgroundWithBlock: | (nullable PFBooleanResultBlock) | block |
Asynchronously* stores the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
-unpinInBackgroundWithBlock: PFObjectDefaultPin | - (BFTask<NSNumber *> *) pinInBackgroundWithName: | (NSString *) | name |
Asynchronously* stores the object and every object it points to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call `-fetchFromLocalDatastore on it.
| name | The name of the pin. |
| - (void) pinInBackgroundWithName: | (NSString *) | name | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* stores the object and every object it points to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
| name | The name of the pin. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (BOOL) pinWithName: | (NSString *) | PF_SWIFT_UNAVAILABLE |
Synchronously* stores the object and every object it points to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
| name | The name of the pin. |
-unpinWithName: Provided by category PFObject(Synchronous).
| - (BOOL) pinWithName: | (NSString *) | name | |
| error: | (NSError **) | error | |
Synchronously* stores the object and every object it points to in the local datastore, recursively.
If those other objects have not been fetched from Parse, they will not be stored. However, if they have changed data, all the changes will be retained. To get the objects back later, you can use a PFQuery that uses PFQuery.-fromLocalDatastore, or you can create an unfetched pointer with +objectWithoutDataWithClassName:objectId: and then call -fetchFromLocalDatastore on it.
| name | The name of the pin. |
| error | Pointer to an NSError that will be set if necessary. |
-unpinWithName: Provided by category PFObject(Synchronous).
| - (void) refreshInBackgroundWithTarget: | (nullable id) | target | |
| selector: | ("Please use `PFObject.-fetchInBackgroundWithBlock:` instead.") | PARSE_DEPRECATED | |
Asynchronously* refreshes the PFObject and calls the given callback.
| target | The target on which the selector will be called. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(PFObject *)refreshedObject error:(NSError *)error. error will be nil on success and set if there was an error. refreshedObject will be the PFObject with the refreshed data. |
PFObject.-fetchInBackgroundWithBlock: instead. Provided by category PFObject(Deprecated).
| - (PFRelation *) relationforKey: | ("Please use -relationForKey: instead.") | PARSE_DEPRECATED |
Returns the instance of PFRelation class associated with the given key.
| key | The key that the relation is associated with. |
PFObject.-relationForKey: instead. | - (PFRelation *) relationForKey: | (NSString *) | key |
Returns the instance of PFRelation class associated with the given key.
| key | The key that the relation is associated with. |
| - (void) removeObject: | (id) | object | |
| forKey: | (NSString *) | key | |
Removes all occurrences of an object from the array associated with a given key.
| object | The object to remove. |
| key | The key. |
| - (void) removeObjectForKey: | (NSString *) | key |
Unsets a key on the object.
| key | The key. |
| - (void) removeObjectsInArray: | (NSArray *) | objects | |
| forKey: | (NSString *) | key | |
Removes all occurrences of the objects contained in another array from the array associated with a given key.
| objects | The array of objects to remove. |
| key | The key. |
| - (void) revert |
Clears any changes to this object made since the last call to save and sets it back to the server state.
| - (void) revertObjectForKey: | (NSString *) | key |
Clears any changes to this object's key that were done after last successful save and sets it back to the server state.
| key | The key to revert changes for. |
| - (BOOL) save: | (NSError **) | error |
Synchronously* saves the PFObject and sets an error if it occurs.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BOOL) saveAll: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Saves a collection of objects *synchronously all at once.
| objects | The array of objects to save. |
Provided by category PFObject(Synchronous).
Saves a collection of objects synchronously all at once and sets an error if necessary.
| objects | The array of objects to save. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Saves a collection of objects all at once asynchronously.
| objects | The array of objects to save. |
| + (void) saveAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFBooleanResultBlock) | block | |
Saves a collection of objects all at once asynchronously and executes the block when done.
| objects | The array of objects to save. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (void) saveAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| target: | (nullable id) | target | |
| selector: | ("Please use `PFObject.+saveAllInBackground:block:` instead.") | PARSE_DEPRECATED | |
Saves a collection of objects all at once asynchronously and calls a callback when done.
| objects | The array of objects to save. |
| target | The object to call selector on. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSNumber *)number error:(NSError *)error. error will be nil on success and set if there was an error. [result boolValue] will tell you whether the call succeeded or not. |
PFObject.+saveAllInBackground:block: instead. Provided by category PFObject(Deprecated).
| - (void) saveEventually: | (nullable PFBooleanResultBlock) | PF_WATCH_UNAVAILABLE |
Saves this object to the server at some unspecified time in the future, even if Parse is currently inaccessible.
Use this when you may not have a solid network connection, and don't need to know when the save completes. If there is some problem with the object such that it can't be saved, it will be silently discarded. If the save completes successfully while the object is still in memory, then callback will be called.
Objects saved with this method will be stored locally in an on-disk cache until they can be delivered to Parse. They will be sent immediately if possible. Otherwise, they will be sent the next time a network connection is available. Objects saved this way will persist even after the app is closed, in which case they will be sent the next time the app is opened. If more than 10MB of data is waiting to be sent, subsequent calls to -saveEventually: will cause old saves to be silently discarded until the connection can be re-established, and the queued objects can be saved.
| callback | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (BFTask<NSNumber *> *) saveInBackground |
| - (void) saveInBackgroundWithBlock: | (nullable PFBooleanResultBlock) | block |
Saves the PFObject asynchronously and executes the given callback block.
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (void) saveInBackgroundWithTarget: | (nullable id) | target | |
| selector: | ("Please use `PFObject.-saveInBackgroundWithBlock:` instead.") | PARSE_DEPRECATED | |
Saves the PFObject asynchronously and calls the given callback.
| target | The object to call selector on. |
| selector | The selector to call. It should have the following signature: (void)callbackWithResult:(NSNumber *)result error:(NSError *)error. error will be nil on success and set if there was an error. [result boolValue] will tell you whether the call succeeded or not. |
PFObject.-saveInBackgroundWithBlock: instead. Provided by category PFObject(Deprecated).
| - (void) setObject: | (id) | object | |
| forKey: | (NSString *) | key | |
Sets the object associated with a given key.
| object | The object for key. A strong reference to the object is maintained by PFObject. Raises an NSInvalidArgumentException if object is nil. If you need to represent a nil value - use NSNull. |
| key | The key for object. Raises an NSInvalidArgumentException if key is nil. |
| - (void) setObject: | (id) | object | |
| forKeyedSubscript: | (NSString *) | key | |
Returns the value associated with a given key.
This method enables usage of literal syntax on PFObject. E.g. object[@"key"] = @"value";
| object | The object for key. A strong reference to the object is maintained by PFObject. Raises an NSInvalidArgumentException if object is nil. If you need to represent a nil value - use NSNull. |
| key | The key for object. Raises an NSInvalidArgumentException if key is nil. |
| - (BOOL) unpin: | (NSError **) | error |
Synchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BOOL) unpinAll: | (nullable NSArray< PFObject * > *) | PF_SWIFT_UNAVAILABLE |
Synchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| objects | The objects. |
Provided by category PFObject(Synchronous).
Synchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| objects | The objects. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BOOL) unpinAll: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | PF_SWIFT_UNAVAILABLE | |
Synchronously* removes the objects and every object they point to in the local datastore, recursively.
| objects | The objects. |
| name | The name of the pin. |
Provided by category PFObject(Synchronous).
| + (BOOL) unpinAll: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
| error: | (NSError **) | error | |
Synchronously* removes the objects and every object they point to in the local datastore, recursively.
| objects | The objects. |
| name | The name of the pin. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
Asynchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| objects | The objects. |
| + (void) unpinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* removes the objects and every object they point to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| objects | The objects. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (BFTask<NSNumber *> *) unpinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
Asynchronously* removes the objects and every object they point to in the local datastore, recursively.
| objects | The objects. |
| name | The name of the pin. |
| + (void) unpinAllInBackground: | (nullable NSArray< PFObject * > *) | objects | |
| withName: | (NSString *) | name | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* removes the objects and every object they point to in the local datastore, recursively.
| objects | The objects. |
| name | The name of the pin. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (BOOL) unpinAllObjects: | (NSError **) | error |
Synchronously* removes all objects in the local datastore using a default pin name: PFObjectDefaultPin.
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| + (BFTask<NSNumber *> *) unpinAllObjectsInBackground |
Asynchronously* removes all objects in the local datastore using a default pin name: PFObjectDefaultPin.
| + (void) unpinAllObjectsInBackgroundWithBlock: | (nullable PFBooleanResultBlock) | block |
Asynchronously* removes all objects in the local datastore using a default pin name: PFObjectDefaultPin.
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (BFTask<NSNumber *> *) unpinAllObjectsInBackgroundWithName: | (NSString *) | name |
Asynchronously* removes all objects with the specified pin name.
| name | The name of the pin. |
| + (void) unpinAllObjectsInBackgroundWithName: | (NSString *) | name | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* removes all objects with the specified pin name.
| name | The name of the pin. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| + (BOOL) unpinAllObjectsWithName: | (NSString *) | PF_SWIFT_UNAVAILABLE |
Synchronously* removes all objects with the specified pin name.
| name | The name of the pin. |
Provided by category PFObject(Synchronous).
| + (BOOL) unpinAllObjectsWithName: | (NSString *) | name | |
| error: | (NSError **) | error | |
Synchronously* removes all objects with the specified pin name.
| name | The name of the pin. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
| - (BFTask<NSNumber *> *) unpinInBackground |
Asynchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| - (void) unpinInBackgroundWithBlock: | (nullable PFBooleanResultBlock) | block |
Asynchronously* removes the object and every object it points to in the local datastore, recursively, using a default pin name: PFObjectDefaultPin.
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (BFTask<NSNumber *> *) unpinInBackgroundWithName: | (NSString *) | name |
Asynchronously* removes the object and every object it points to in the local datastore, recursively.
| name | The name of the pin. |
| - (void) unpinInBackgroundWithName: | (NSString *) | name | |
| block: | (nullable PFBooleanResultBlock) | block | |
Asynchronously* removes the object and every object it points to in the local datastore, recursively.
| name | The name of the pin. |
| block | The block to execute. It should have the following argument signature: ^(BOOL succeeded, NSError *error). |
| - (BOOL) unpinWithName: | (NSString *) | PF_SWIFT_UNAVAILABLE |
Synchronously* removes the object and every object it points to in the local datastore, recursively.
| name | The name of the pin. |
Provided by category PFObject(Synchronous).
| - (BOOL) unpinWithName: | (NSString *) | name | |
| error: | (NSError **) | error | |
Synchronously* removes the object and every object it points to in the local datastore, recursively.
| name | The name of the pin. |
| error | Pointer to an NSError that will be set if necessary. |
Provided by category PFObject(Synchronous).
|
readwritenonatomicstrong |
The ACL for this object.
|
readnonatomiccopy |
Returns an array of the keys contained in this object.
This does not include createdAt, updatedAt, authData, or objectId. It does include things like username and ACL.
|
readnonatomicstrong |
When the object was created.
|
readnonatomicassign |
|
readnonatomicassign |
Gets whether any key-value pair in this object (or its children) has been added/updated/removed and not saved yet.
|
readwritenonatomicstrong |
The id of the object.
|
readnonatomicstrong |
The class name of the object.
|
readnonatomicstrong |
When the object was last updated.
1.8.9.1