LCInstallation

Objective-C

@interface LCInstallation : LCObject

Swift

class LCInstallation : LCObject

LeanCloud installation type.

  • The badge for the installation.

    Declaration

    Objective-C

    @property (nonatomic) NSInteger badge;

    Swift

    var badge: Int { get set }
  • The timeZone for the installation.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *timeZone;

    Swift

    var timeZone: String? { get set }
  • The device type for the installation.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *deviceType;

    Swift

    var deviceType: String? { get set }
  • The installation ID for the installation.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *installationId;

    Swift

    var installationId: String? { get set }
  • The device profile for the installation.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *deviceProfile;

    Swift

    var deviceProfile: String? { get set }
  • The APNs topic, typically is the bundle ID for the App.

    Declaration

    Objective-C

    @property (nonatomic, copy, nullable) NSString *apnsTopic;

    Swift

    var apnsTopic: String? { get set }
  • The channels for the installation.

    Declaration

    Objective-C

    @property (nonatomic, strong, nullable) NSArray *channels;

    Swift

    var channels: [Any]? { get set }
  • The hex string of the APNs device token.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *deviceToken;

    Swift

    var deviceToken: String? { get }
  • The team id of the apple developer account.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *apnsTeamId;

    Swift

    var apnsTeamId: String? { get }
  • Query for installation

    Declaration

    Objective-C

    + (nonnull LCQuery *)query;

    Swift

    class func query() -> LCQuery
  • Default installation instance.

    Declaration

    Objective-C

    + (nonnull instancetype)defaultInstallation;

    Swift

    class func `default`() -> Self
  • For compatibility, same as the defaultInstallation.

    Declaration

    Objective-C

    + (nonnull instancetype)currentInstallation;

    Swift

    class func current() -> Self
  • Clear default/current installation’s Persistent Cache.

    Declaration

    Objective-C

    + (void)clearPersistentCache;

    Swift

    class func clearPersistentCache()
  • Create a new installation instance.

    Declaration

    Objective-C

    + (nonnull instancetype)installation;
  • Set device token.

    Declaration

    Objective-C

    - (void)setDeviceTokenFromData:(nonnull NSData *)deviceTokenData
                            teamId:(nonnull NSString *)teamId;

    Swift

    func setDeviceTokenFrom(_ deviceTokenData: Data, teamId: String)

    Parameters

    deviceTokenData

    The device token.

    teamId

    The team id of the apple developer account.

  • Set hex string of the device token.

    Declaration

    Objective-C

    - (void)setDeviceTokenHexString:(nonnull NSString *)deviceTokenString
                             teamId:(nonnull NSString *)teamId;

    Swift

    func setDeviceTokenHexString(_ deviceTokenString: String, teamId: String)

    Parameters

    deviceTokenString

    The hex string of the device token.

    teamId

    The team id of the apple developer account.