Constants
The following constants are available globally.
-
Undocumented
Declaration
Objective-C
extern double LeanCloudObjcVersionNumberSwift
var LeanCloudObjcVersionNumber: Double -
Undocumented
Declaration
Objective-C
extern const unsigned char LeanCloudObjcVersionString[] -
Undocumented
Declaration
Objective-C
extern NSString *const kLCPushTargetPlatformIOSSwift
let kLCPushTargetPlatformIOS: String -
Undocumented
Declaration
Objective-C
extern NSString *const kLCPushTargetPlatformAndroidSwift
let kLCPushTargetPlatformAndroid: String -
Undocumented
Declaration
Objective-C
extern NSString *const kLCPushTargetPlatformWindowsPhoneSwift
let kLCPushTargetPlatformWindowsPhone: String -
Undocumented
Declaration
Objective-C
static NSString * const USER_AGENT = @"LeanCloud-Objc-SDK/" SDK_VERSIONSwift
let USER_AGENT: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCHeaderFieldNameIdSwift
let LCHeaderFieldNameId: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCHeaderFieldNameKeySwift
let LCHeaderFieldNameKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCHeaderFieldNameSignSwift
let LCHeaderFieldNameSign: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCHeaderFieldNameSessionSwift
let LCHeaderFieldNameSession: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCHeaderFieldNameProductionSwift
let LCHeaderFieldNameProduction: String -
Undocumented
Declaration
Objective-C
extern NSString * const kLCStatusTypeTimelineSwift
let kLCStatusTypeTimeline: String -
Undocumented
Declaration
Objective-C
extern NSString * const kLCStatusTypePrivateMessageSwift
let kLCStatusTypePrivateMessage: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LeanCloudSocialPlatform const LeanCloudSocialPlatformWeiBoSwift
static let weiBo: LeanCloudSocialPlatform -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LeanCloudSocialPlatform const LeanCloudSocialPlatformQQSwift
static let QQ: LeanCloudSocialPlatform -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LeanCloudSocialPlatform const LeanCloudSocialPlatformWeiXinSwift
static let weiXin: LeanCloudSocialPlatform -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInternalServerSwift
let kLCErrorInternalServer: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorConnectionFailedSwift
let kLCErrorConnectionFailed: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorObjectNotFoundSwift
let kLCErrorObjectNotFound: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidQuerySwift
let kLCErrorInvalidQuery: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidClassNameSwift
let kLCErrorInvalidClassName: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorMissingObjectIdSwift
let kLCErrorMissingObjectId: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidKeyNameSwift
let kLCErrorInvalidKeyName: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidPointerSwift
let kLCErrorInvalidPointer: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidJSONSwift
let kLCErrorInvalidJSON: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorCommandUnavailableSwift
let kLCErrorCommandUnavailable: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorIncorrectTypeSwift
let kLCErrorIncorrectType: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidChannelNameSwift
let kLCErrorInvalidChannelName: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidDeviceTokenSwift
let kLCErrorInvalidDeviceToken: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorPushMisconfiguredSwift
let kLCErrorPushMisconfigured: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorObjectTooLargeSwift
let kLCErrorObjectTooLarge: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorOperationForbiddenSwift
let kLCErrorOperationForbidden: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorCacheMissSwift
let kLCErrorCacheMiss: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidNestedKeySwift
let kLCErrorInvalidNestedKey: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidFileNameSwift
let kLCErrorInvalidFileName: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidACLSwift
let kLCErrorInvalidACL: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorTimeoutSwift
let kLCErrorTimeout: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidEmailAddressSwift
let kLCErrorInvalidEmailAddress: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorDuplicateValueSwift
let kLCErrorDuplicateValue: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidRoleNameSwift
let kLCErrorInvalidRoleName: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorExceededQuotaSwift
let kLCErrorExceededQuota: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCScriptErrorSwift
let kLCScriptError: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCValidationErrorSwift
let kLCValidationError: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorReceiptMissingSwift
let kLCErrorReceiptMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidPurchaseReceiptSwift
let kLCErrorInvalidPurchaseReceipt: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorPaymentDisabledSwift
let kLCErrorPaymentDisabled: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidProductIdentifierSwift
let kLCErrorInvalidProductIdentifier: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorProductNotFoundInAppStoreSwift
let kLCErrorProductNotFoundInAppStore: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidServerResponseSwift
let kLCErrorInvalidServerResponse: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorProductDownloadFileSystemFailureSwift
let kLCErrorProductDownloadFileSystemFailure: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidImageDataSwift
let kLCErrorInvalidImageData: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUnsavedFileSwift
let kLCErrorUnsavedFile: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorFileDeleteFailureSwift
let kLCErrorFileDeleteFailure: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUsernameMissingSwift
let kLCErrorUsernameMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserPasswordMissingSwift
let kLCErrorUserPasswordMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUsernameTakenSwift
let kLCErrorUsernameTaken: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserEmailTakenSwift
let kLCErrorUserEmailTaken: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserEmailMissingSwift
let kLCErrorUserEmailMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserWithEmailNotFoundSwift
let kLCErrorUserWithEmailNotFound: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserCannotBeAlteredWithoutSessionSwift
let kLCErrorUserCannotBeAlteredWithoutSession: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserCanOnlyBeCreatedThroughSignUpSwift
let kLCErrorUserCanOnlyBeCreatedThroughSignUp: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorAccountAlreadyLinkedSwift
let kLCErrorAccountAlreadyLinked: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserIdMismatchSwift
let kLCErrorUserIdMismatch: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUsernamePasswordMismatchSwift
let kLCErrorUsernamePasswordMismatch: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserNotFoundSwift
let kLCErrorUserNotFound: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserMobilePhoneMissingSwift
let kLCErrorUserMobilePhoneMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserWithMobilePhoneNotFoundSwift
let kLCErrorUserWithMobilePhoneNotFound: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserMobilePhoneNumberTakenSwift
let kLCErrorUserMobilePhoneNumberTaken: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserMobilePhoneNotVerifiedSwift
let kLCErrorUserMobilePhoneNotVerified: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorUserSNSAuthDataInvalidSwift
let kLCErrorUserSNSAuthDataInvalid: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorLinkedIdMissingSwift
let kLCErrorLinkedIdMissing: Int -
Undocumented
Declaration
Objective-C
extern const NSInteger kLCErrorInvalidLinkedSessionSwift
let kLCErrorInvalidLinkedSession: Int -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLeanCloudErrorDomainSwift
let kLeanCloudErrorDomain: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLeanCloudRESTAPIResponseErrorSwift
let kLeanCloudRESTAPIResponseError: String -
Undocumented
Declaration
Objective-C
extern NSString *const LCLoggerDomainCURLSwift
let LCLoggerDomainCURL: String -
Undocumented
Declaration
Objective-C
extern NSString *const LCLoggerDomainNetworkSwift
let LCLoggerDomainNetwork: String -
Undocumented
Declaration
Objective-C
extern NSString *const LCLoggerDomainIMSwift
let LCLoggerDomainIM: String -
Undocumented
Declaration
Objective-C
extern NSString *const LCLoggerDomainStorageSwift
let LCLoggerDomainStorage: String -
Undocumented
Declaration
Objective-C
extern NSString *const LCLoggerDomainDefaultSwift
let LCLoggerDomainDefault: String -
error user info key
Declaration
Objective-C
extern NSString *const _Nonnull kLCIMCodeKeySwift
let kLCIMCodeKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLCIMAppCodeKeySwift
let kLCIMAppCodeKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLCIMAppMsgKeySwift
let kLCIMAppMsgKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLCIMReasonKeySwift
let kLCIMReasonKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const kLCIMDetailKeySwift
let kLCIMDetailKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyLastMessageSwift
static let lastMessage: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyLastMessageAtSwift
static let lastMessageAt: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyLastReadAtSwift
static let lastReadAt: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyLastDeliveredAtSwift
static let lastDeliveredAt: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyUnreadMessagesCountSwift
static let unreadMessagesCount: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMConversationUpdatedKey const LCIMConversationUpdatedKeyUnreadMessagesMentionedSwift
static let unreadMessagesMentioned: LCIMConversationUpdatedKey -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionOpenSwift
static let open: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionStartSwift
static let start: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionAddSwift
static let add: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionRemoveSwift
static let remove: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionBlockSwift
static let block: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT LCIMSignatureAction const LCIMSignatureActionUnblockSwift
static let unblock: LCIMSignatureAction -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeNoneSwift
static let none: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeTextSwift
static let text: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeImageSwift
static let image: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeAudioSwift
static let audio: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeVideoSwift
static let video: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeLocationSwift
static let location: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeFileSwift
static let file: LCIMMessageMediaType -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT const LCIMMessageMediaType LCIMMessageMediaTypeRecalledSwift
static let recalled: LCIMMessageMediaType
-
Posted when network reachability changes. This notification assigns no notification object. The
userInfodictionary contains anNSNumberobject under theLCNetworkingReachabilityNotificationStatusItemkey, representing theLCNetworkReachabilityStatusvalue for the current network reachability.Warning
In order for network reachability to be monitored, include theSystemConfigurationframework in the active target’s “Link Binary With Library” build phase, and add#import <SystemConfiguration/SystemConfiguration.h>to the header prefix of the project (Prefix.pch).Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingReachabilityDidChangeNotificationSwift
static let LCNetworkingReachabilityDidChange: NSNotification.Name -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCNetworkingReachabilityNotificationStatusItemSwift
let LCNetworkingReachabilityNotificationStatusItem: String
-
Error Domains
The following error domain is predefined.
NSString * const LCURLRequestSerializationErrorDomain
Constants
LCURLRequestSerializationErrorDomainLCURLRequestSerializer errors. Error codes forLCURLRequestSerializationErrorDomaincorrespond to codes inNSURLErrorDomain.Declaration
Objective-C
extern NSString *const _Nonnull LCURLRequestSerializationErrorDomainSwift
let LCURLRequestSerializationErrorDomain: String -
User info dictionary keys
These keys may exist in the user info dictionary, in addition to those defined for NSError.
NSString * const LCNetworkingOperationFailingURLRequestErrorKey
Constants
LCNetworkingOperationFailingURLRequestErrorKeyThe corresponding value is anNSURLRequestcontaining the request of the operation associated with an error. This key is only present in theLCURLRequestSerializationErrorDomain.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingOperationFailingURLRequestErrorKeySwift
let LCNetworkingOperationFailingURLRequestErrorKey: String -
Throttling Bandwidth for HTTP Request Input Streams
See
-throttleBandwidthWithPacketSize:delay:Constants
kLCUploadStream3GSuggestedPacketSizeMaximum packet size, in number of bytes. Equal to 16kb.kLCUploadStream3GSuggestedDelayDuration of delay each time a packet is read. Equal to 0.2 seconds.Declaration
Objective-C
extern const NSUInteger kLCUploadStream3GSuggestedPacketSizeSwift
let kLCUploadStream3GSuggestedPacketSize: UInt -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSTimeInterval const kLCUploadStream3GSuggestedDelaySwift
let kLCUploadStream3GSuggestedDelay: TimeInterval -
Error Domains
The following error domain is predefined.
NSString * const LCURLResponseSerializationErrorDomain
Constants
LCURLResponseSerializationErrorDomainLCURLResponseSerializer errors. Error codes forLCURLResponseSerializationErrorDomaincorrespond to codes inNSURLErrorDomain.Declaration
Objective-C
extern NSString *const _Nonnull LCURLResponseSerializationErrorDomainSwift
let LCURLResponseSerializationErrorDomain: String -
User info dictionary keys
These keys may exist in the user info dictionary, in addition to those defined for NSError.
NSString * const LCNetworkingOperationFailingURLResponseErrorKeyNSString * const LCNetworkingOperationFailingURLResponseDataErrorKey
Constants
LCNetworkingOperationFailingURLResponseErrorKeyThe corresponding value is anNSURLResponsecontaining the response of the operation associated with an error. This key is only present in theLCURLResponseSerializationErrorDomain.LCNetworkingOperationFailingURLResponseDataErrorKeyThe corresponding value is anNSDatacontaining the original data of the operation associated with an error. This key is only present in theLCURLResponseSerializationErrorDomain.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingOperationFailingURLResponseErrorKeySwift
let LCNetworkingOperationFailingURLResponseErrorKey: String -
Undocumented
Declaration
Objective-C
FOUNDATION_EXPORT NSString * const LCNetworkingOperationFailingURLResponseDataErrorKeySwift
let LCNetworkingOperationFailingURLResponseDataErrorKey: String
-
Posted when a task resumes.
Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidResumeNotificationSwift
static let LCNetworkingTaskDidResume: NSNotification.Name -
Posted when a task finishes executing. Includes a userInfo dictionary with additional information about the task.
Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteNotificationSwift
static let LCNetworkingTaskDidComplete: NSNotification.Name -
Posted when a task suspends its execution.
Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidSuspendNotificationSwift
static let LCNetworkingTaskDidSuspend: NSNotification.Name -
Posted when a session is invalidated.
Declaration
Objective-C
extern NSString *const _Nonnull LCURLSessionDidInvalidateNotificationSwift
static let LCURLSessionDidInvalidate: NSNotification.Name -
Posted when a session download task encountered an error when moving the temporary download file to a specified destination.
Declaration
Objective-C
extern NSString *const _Nonnull LCURLSessionDownloadTaskDidFailToMoveFileNotificationSwift
static let LCURLSessionDownloadTaskDidFailToMoveFile: NSNotification.Name -
The raw response data of the task. Included in the userInfo dictionary of the
LCNetworkingTaskDidCompleteNotificationif response data exists for the task.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteResponseDataKeySwift
let LCNetworkingTaskDidCompleteResponseDataKey: String -
The serialized response object of the task. Included in the userInfo dictionary of the
LCNetworkingTaskDidCompleteNotificationif the response was serialized.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteSerializedResponseKeySwift
let LCNetworkingTaskDidCompleteSerializedResponseKey: String -
The response serializer used to serialize the response. Included in the userInfo dictionary of the
LCNetworkingTaskDidCompleteNotificationif the task has an associated response serializer.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteResponseSerializerKeySwift
let LCNetworkingTaskDidCompleteResponseSerializerKey: String -
The file path associated with the download task. Included in the userInfo dictionary of the
LCNetworkingTaskDidCompleteNotificationif an the response data has been stored directly to disk.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteAssetPathKeySwift
let LCNetworkingTaskDidCompleteAssetPathKey: String -
Any error associated with the task, or the serialization of the response. Included in the userInfo dictionary of the
LCNetworkingTaskDidCompleteNotificationif an error exists.Declaration
Objective-C
extern NSString *const _Nonnull LCNetworkingTaskDidCompleteErrorKeySwift
let LCNetworkingTaskDidCompleteErrorKey: String
View on GitHub
Install in Dash
Constants Reference