Classes

The following classes are available globally.

  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYAuthContainer : NSObject <SKYAuthResponseDelegateProtocol>
    
    /// Undocumented
    @property (nonatomic, readonly) NSString *_Nullable currentUserRecordID;
    /// Undocumented
    @property (nonatomic, readonly) SKYAccessToken *_Nullable currentAccessToken;
    /// Undocumented
    @property (nonatomic, readonly) SKYRecord *_Nullable currentUser;
    /// Undocumented
    @property (nonatomic, readonly) BOOL currentUserVerified;
    
    /**
     Set current user data encryption enable state
    
     When this is on, current user data will be saved and retrieved from Keychain instead of
     UserDefaults. Default is NO.
     */
    - (void)setCurrentUserDataEncryptionEnable:(BOOL)enabled;
    
    /**
     Updates the <currentUserRecordID> and <currentAccessToken>. The updated access credentials are also
     stored in persistent
     storage.
    
     This method is called when operation sign up, log in and log out is performed using the container's
     convenient
     method and when the operation is completed successfully.
     */
    - (void)updateWithUserRecordID:(NSString *_Nullable)userRecordID
                       accessToken:(SKYAccessToken *_Nullable)accessToken;
    
    /**
     Updates the <currentUser> and <currentAccessToken>. The updated access credentials are also
     stored in persistent storage.
    
     This method is called when operation sign up, log in and log out is performed using the container's
     convenient
     method and when the operation is completed successfully.
     */
    - (void)updateWithUser:(SKYRecord *_Nullable)user
               accessToken:(SKYAccessToken *_Nullable)accessToken;
    
    /**
     Set the handler to be called when SKYOperation's subclasses failed to authenticate itself with
     remote server.
    
     Such circumstance might arise on a container when either:
    
     1. There are no logged-in users for an opertion that requires users login.
     2. Access token is invalid or has been expired.
    
     In either cases, developer should prompt for re-authentication of user and login using
     <SKYLoginUserOperation>.
    
     NOTE: Any attempt to invoke user logout related operation within the set handler will created an
     feedback loop as logouting an invalid access token is also a kind of authentication error.
     */
    - (void)setAuthenticationErrorHandler:(void (^_Nullable)(SKYContainer *container,
                                                             SKYAccessToken *_Nullable token,
                                                             NSError *_Nullable error))authErrorHandler;
    
    @end

    Swift

    class SKYAuthContainer : NSObject, SKYAuthResponseDelegateProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYRecord : NSObject <NSCopying, NSCoding>

    Swift

    class SKYRecord : NSObject, NSCopying, NSCoding
  • provides a local storage for records that is synchronized with a subset of records on remote server. Changes made remotely are reflected on the local storage and vice versa.

    This class is useful for applications in which records are available offline, and that user may modify data when device is offline to have changes uploaded to remote server when device becomes online again.

    User should not instantiate an instance of this class directly. An instance of should be obtained from .

    See more

    Declaration

    Objective-C

    @interface SKYRecordStorage : NSObject

    Swift

    class SKYRecordStorage : NSObject
  • The is responsible for keeping references to all currently registered. It allows retrieving across application restart so that is associated with the same persistent storage on device.

    See more

    Declaration

    Objective-C

    @interface SKYRecordStorageCoordinator : NSObject

    Swift

    class SKYRecordStorageCoordinator : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYAccessControl : NSObject <NSCoding, NSCopying>

    Swift

    class SKYAccessControl : NSObject, NSCoding, NSCopying
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYAsset : NSObject <NSCopying, NSCoding>

    Swift

    class SKYAsset : NSObject, NSCopying, NSCoding
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYConfiguration : NSObject
    
    @property (nonatomic, strong) NSURL *endPointAddress;
    @property (nonatomic, strong) NSString *apiKey;
    @property (nonatomic, assign) BOOL encryptCurrentUserData;
    
    @end

    Swift

    class SKYConfiguration : NSObject
  • is a subclass of that implements fetching records from Skygear. Use this to fetch a number of records by specifying an array of s.

    When the operation completes, the will be called with all the fetched records, or an error will be returned stating the error. For each , the will be called with the fetched record or an error if one occurred.

    See more

    Declaration

    Objective-C

    @interface SKYFetchRecordsOperation : SKYDatabaseOperation

    Swift

    class SKYFetchRecordsOperation : SKYDatabaseOperation
  • Undocumented

    Declaration

    Objective-C

    @interface SKYNotificationID : NSObject <NSCopying>

    Swift

    class SKYNotificationID : NSObject, NSCopying
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYQuery : NSObject <NSSecureCoding>

    Swift

    class SKYQuery : NSObject, NSSecureCoding
  • Undocumented

    Declaration

    Objective-C

    @interface SKYQueryCursor : NSObject

    Swift

    class SKYQueryCursor : NSObject
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYRecordID : NSObject <NSCopying, NSSecureCoding>

    Swift

    class SKYRecordID : NSObject, NSCopying, NSSecureCoding
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYReference : NSObject <NSCopying, NSCoding>

    Swift

    class SKYReference : NSObject, NSCopying, NSCoding
  • The specifies a condition by whether a user relation exists between two user, one being the user saved in a record attribute an another being the current user.

    See more

    Declaration

    Objective-C

    @interface SKYRelationPredicate : NSPredicate

    Swift

    class SKYRelationPredicate : NSPredicate
  • encapsulates the response dictionary by providing convenient methods to access its content.

    is a generic class that is expected to be subclassed to implement other common pattern of response dictionary.

    See more

    Declaration

    Objective-C

    @interface SKYResponse : NSObject

    Swift

    class SKYResponse : NSObject
  • implements a common processing pattern for processing response dictionary.

    The response dictionary is expected to contain an array specified with the key result. Each item in the array is a dictionary for individual item. The dictionary must have the _id key which value will be used as the result key.

    See more

    Declaration

    Objective-C

    @interface SKYResultArrayResponse : SKYResponse

    Swift

    class SKYResultArrayResponse : SKYResponse
  • Undocumented

    See more

    Declaration

    Objective-C

    @interface SKYRole : NSObject <NSCoding>

    Swift

    class SKYRole : NSObject, NSCoding
  • SKYSequence is a special value that creates an auto-increment field on the record when saved.

    See more

    Declaration

    Objective-C

    @interface SKYSequence : NSObject <NSCopying, NSCoding>

    Swift

    class SKYSequence : NSObject, NSCopying, NSCoding
  • is a subclass of which an user object in Skygear. Use this operation to create a new user account in the container. When a new user is created, an and an will be returned.

    A user account is uniquely identified by an email address given by the user. If the user does not provide an email address, you can create an anonymous user instead and change the user information to associate an email address to this user later.

    A password must be supplied to create an user account in order to protect user content. For anonymous user account, you should generate a password on the user’s behalf and save the password.

    If you assign a block to signupCompletionBlock, it will be called when the operation is completed.

    See more

    Declaration

    Objective-C

    @interface SKYSignupUserOperation : SKYAuthOperation

    Swift

    class SKYSignupUserOperation : SKYAuthOperation
  • SKYUnknownValue indicates that the value is of unknown type to Skygear. This usually occurs when the database contains data that is not managed by Skygear.

    You should not instantiate an instance of this class.

    See more

    Declaration

    Objective-C

    @interface SKYUnknownValue : NSObject <NSCoding>

    Swift

    class SKYUnknownValue : NSObject, NSCoding