LCApplication
public class LCApplication
LeanCloud Application.
an LCApplication
object is an abstraction of LeanCloud application,
it is the context of application-specific settings and objects.
-
Undocumented
See moreDeclaration
Swift
public enum LogLevel : Int, Comparable
-
Console log level, default is
LogLevel.off
.Declaration
Swift
public static var logLevel: LogLevel
-
Default application.
Declaration
Swift
public static let `default`: LCApplication
-
Undocumented
Declaration
Swift
public typealias Identifier = String
-
Application ID.
Declaration
Swift
public private(set) var id: LCApplication.Identifier! { get }
-
Application key.
Declaration
Swift
public private(set) var key: String! { get }
-
Application server URL string.
Declaration
Swift
public private(set) var serverURL: String? { get }
-
Module of customizable server.
See moreDeclaration
Swift
public enum ServerCustomizableModule
-
Environment of the application.
See moreDeclaration
Swift
public struct Environment : OptionSet
-
Configuration of the application.
See moreDeclaration
Swift
public struct Configuration : CustomDebugStringConvertible
-
Application configuration.
Declaration
Swift
public private(set) var configuration: Configuration { get }
-
Current installation.
Declaration
Swift
public var currentInstallation: LCInstallation { get }
-
Undocumented
Declaration
Swift
public var currentInstallationFileURL: URL? { get }
-
Current user.
Declaration
Swift
public var currentUser: LCUser? { get set }
-
Undocumented
Declaration
Swift
public var currentUserFileURL: URL? { get }
-
Create an application.
Throws
IfserverURL
not provide in some region.Declaration
Swift
public init( id: String, key: String, serverURL: String? = nil, configuration: Configuration = .default) throws
Parameters
id
see property
id
.key
see property
key
.serverURL
see property
serverURL
, default isnil
, MUST provide if the application is in China.configuration
see property
configuration
, default isConfiguration.default
-
Set up an application.
Throws
IfserverURL
not provide in some region.Declaration
Swift
public func set( id: String, key: String, serverURL: String? = nil, configuration: Configuration = .default) throws
Parameters
id
see property
id
.key
see property
key
.serverURL
see property
serverURL
, default isnil
, MUST provide if the application is in China.configuration
see property
configuration
, default isConfiguration.default
-
Before release the instance of the application, should unregister it to break circular reference.
Declaration
Swift
public func unregister()