LuxChat  2.0
Instant messenger for iOS
Instance Methods | Class Methods | Properties | List of all members
PFInstallation Class Reference

#import <PFInstallation.h>

Inheritance diagram for PFInstallation:
PFObject

Instance Methods

(void) - setDeviceTokenFromData:
 
- Instance Methods inherited from PFObject
(instancetype) - initWithClassName:
 
More...
 
(nullable id) - objectForKey:
 
More...
 
(void) - setObject:forKey:
 
(void) - removeObjectForKey:
 
(nullable id) - objectForKeyedSubscript:
 
(void) - setObject:forKeyedSubscript:
 
(PFRelation *) - relationForKey:
 
(PFRelation *) - relationforKey:
 
(void) - revert
 
(void) - revertObjectForKey:
 
(void) - addObject:forKey:
 
More...
 
(void) - addObjectsFromArray:forKey:
 
(void) - addUniqueObject:forKey:
 
(void) - addUniqueObjectsFromArray:forKey:
 
(void) - removeObject:forKey:
 
(void) - removeObjectsInArray:forKey:
 
(void) - incrementKey:
 
More...
 
(void) - incrementKey:byAmount:
 
(BFTask< NSNumber * > *) - saveInBackground
 
More...
 
(void) - saveInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) - PF_WATCH_UNAVAILABLE
 
(void) - saveEventually:
 
(BFTask< __kindof PFObject * > *) - fetchInBackground
 
(void) - fetchInBackgroundWithBlock:
 
(BFTask< __kindof PFObject * > *) - fetchIfNeededInBackground
 
(void) - fetchIfNeededInBackgroundWithBlock:
 
(BFTask< __kindof PFObject * > *) - fetchFromLocalDatastoreInBackground
 
More...
 
(void) - fetchFromLocalDatastoreInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) - deleteInBackground
 
More...
 
(void) - deleteInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) - PF_WATCH_UNAVAILABLE
 
(BOOL) - isDirtyForKey:
 
(BFTask< NSNumber * > *) - pinInBackground
 
More...
 
(void) - pinInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) - pinInBackgroundWithName:
 
(void) - pinInBackgroundWithName:block:
 
(BFTask< NSNumber * > *) - unpinInBackground
 
More...
 
(void) - unpinInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) - unpinInBackgroundWithName:
 
(void) - unpinInBackgroundWithName:block:
 
(void) - saveInBackgroundWithTarget:selector:
 
More...
 
(void) - refreshInBackgroundWithTarget:selector:
 
More...
 
(void) - fetchInBackgroundWithTarget:selector:
 
(void) - fetchIfNeededInBackgroundWithTarget:selector:
 
(void) - deleteInBackgroundWithTarget:selector:
 
More...
 
(BOOL) - PF_SWIFT_UNAVAILABLE
 
More...
 
(nullable instancetype) - PF_SWIFT_UNAVAILABLE
 
More...
 
(nullable instancetype) - PF_SWIFT_UNAVAILABLE
 
(nullable instancetype) - PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) - PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) - PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) - PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) - save:
 
(nullable instancetype) - fetch:
 
(nullable instancetype) - fetchIfNeeded:
 
(nullable instancetype) - fetchFromLocalDatastore:
 
(BOOL) - delete:
 
(BOOL) - pin:
 
(BOOL) - pinWithName:
 
(BOOL) - pinWithName:error:
 
(BOOL) - unpin:
 
(BOOL) - unpinWithName:
 
(BOOL) - unpinWithName:error:
 

Class Methods

(nullable instancetype) + currentInstallation
 
More...
 
(BFTask< __kindof PFInstallation * > *) + getCurrentInstallationInBackground
 
(nullable PFQuery *) + query
 
More...
 
- Class Methods inherited from PFObject
(instancetype) + objectWithClassName:
 
(instancetype) + objectWithClassName:dictionary:
 
(instancetype) + objectWithoutDataWithClassName:objectId:
 
(BFTask< NSNumber * > *) + saveAllInBackground:
 
More...
 
(void) + saveAllInBackground:block:
 
(BFTask< NSNumber * > *) + deleteAllInBackground:
 
More...
 
(void) + deleteAllInBackground:block:
 
(BFTask< NSArray< __kindof PFObject * > * > *) + fetchAllInBackground:
 
More...
 
(void) + fetchAllInBackground:block:
 
(BFTask< NSArray< __kindof PFObject * > * > *) + fetchAllIfNeededInBackground:
 
(void) + fetchAllIfNeededInBackground:block:
 
(BFTask< NSNumber * > *) + pinAllInBackground:
 
More...
 
(void) + pinAllInBackground:block:
 
(BFTask< NSNumber * > *) + pinAllInBackground:withName:
 
(void) + pinAllInBackground:withName:block:
 
(BFTask< NSNumber * > *) + unpinAllObjectsInBackground
 
More...
 
(void) + unpinAllObjectsInBackgroundWithBlock:
 
(BFTask< NSNumber * > *) + unpinAllObjectsInBackgroundWithName:
 
(void) + unpinAllObjectsInBackgroundWithName:block:
 
(BFTask< NSNumber * > *) + unpinAllInBackground:
 
(void) + unpinAllInBackground:block:
 
(BFTask< NSNumber * > *) + unpinAllInBackground:withName:
 
(void) + unpinAllInBackground:withName:block:
 
(void) + saveAllInBackground:target:selector:
 
More...
 
(void) + fetchAllInBackground:target:selector:
 
More...
 
(void) + fetchAllIfNeededInBackground:target:selector:
 
(void) + deleteAllInBackground:target:selector:
 
More...
 
(BOOL) + PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) + saveAll:
 
More...
 
(BOOL) + saveAll:error:
 
(nullable NSArray< __kindof PFObject * > *) + fetchAll:
 
More...
 
(nullable NSArray< __kindof PFObject * > *) + fetchAll:error:
 
(nullable NSArray< __kindof PFObject * > *) + fetchAllIfNeeded:
 
(nullable NSArray< __kindof PFObject * > *) + fetchAllIfNeeded:error:
 
(BOOL) + deleteAll:
 
More...
 
(BOOL) + deleteAll:error:
 
(BOOL) + pinAll:
 
More...
 
(BOOL) + pinAll:error:
 
(BOOL) + pinAll:withName:
 
(BOOL) + pinAll:withName:error:
 
(BOOL) + unpinAllObjects:
 
(BOOL) + unpinAllObjectsWithName:
 
(BOOL) + unpinAllObjectsWithName:error:
 
(BOOL) + unpinAll:
 
(BOOL) + unpinAll:error:
 
(BOOL) + unpinAll:withName:
 
(BOOL) + unpinAll:withName:error:
 

Properties

NSString * deviceType
 
More...
 
NSString * installationId
 
NSString * deviceToken
 
NSInteger badge
 
NSString * timeZone
 
NSArray< NSString * > * channels
 
- Properties inherited from PFObject
NSString * parseClassName
 
More...
 
NSString * objectId
 
NSDate * updatedAt
 
NSDate * createdAt
 
PFACLACL
 
NSArray< NSString * > * allKeys
 
BOOL dataAvailable
 
More...
 
BOOL dirty
 
More...
 

Detailed Description

Copyright (c) 2015-present, Parse, LLC. All rights reserved.

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. A Parse Framework Installation Object that is a local representation of an installation persisted to the Parse cloud. This class is a subclass of a PFObject, and retains the same functionality of a PFObject, but also extends it with installation-specific fields and related immutability and validity checks.

A valid PFInstallation can only be instantiated via +currentInstallation because the required identifier fields are readonly. The timeZone and badge fields are also readonly properties which are automatically updated to match the device's time zone and application badge when the PFInstallation is saved, thus these fields might not reflect the latest device state if the installation has not recently been saved.

PFInstallation objects which have a valid deviceToken and are saved to the Parse cloud can be used to target push notifications.

Method Documentation

+ (nullable instancetype) currentInstallation



Gets the currently-running installation from disk and returns an instance of it.

If this installation is not stored on disk this method will create a new PFInstallation with deviceType and installationId fields set to those of the current installation.

Returns
Returns a PFInstallation that represents the currently-running installation if it could be loaded from disk, otherwise - nil.
+ (BFTask<__kindof PFInstallation *> *) getCurrentInstallationInBackground

Asynchronously* loads the currently-running installation from disk and returns an instance of it.

If this installation is not stored on disk this method will create a new PFInstallation with deviceType and installationId fields set to those of the current installation.

Returns
Returns a task that incapsulates the current installation.
+ (nullable PFQuery *) query



Creates a PFQuery for PFInstallation objects.

Only the following types of queries are allowed for installations:

  • [query getObjectWithId:<value>]
  • [query whereKey:@"installationId" equalTo:<value>]
  • [query whereKey:@"installationId" matchesKey:<key in query> inQuery:<query>]

You can add additional query conditions, but one of the above must appear as a top-level AND clause in the query.

- (void) setDeviceTokenFromData: (nullable NSData *)  deviceTokenData

Sets the device token string property from an NSData-encoded token.

Parameters
deviceTokenDataA token that identifies the device.

Property Documentation

- (NSInteger) badge
readwritenonatomicassign

The badge for the PFInstallation.

- (NSArray<NSString *>*) channels
readwritenonatomiccopy

The channels for the PFInstallation.

- (NSString*) deviceToken
readwritenonatomiccopy

The device token for the PFInstallation.

- (NSString*) deviceType
readnonatomiccopy



The device type for the PFInstallation.

- (NSString*) installationId
readnonatomiccopy

The installationId for the PFInstallation.

- (NSString*) timeZone
readnonatomiccopy

The name of the time zone for the PFInstallation.


The documentation for this class was generated from the following file: