LCEngine
public class LCEngine
LeanCloud Cloud Engine Client
-
Call the cloud function synchronously.
Declaration
Swift
public static func run( application: LCApplication = .default, _ function: String, parameters: [String: Any]? = nil) -> LCGenericResult<Any>
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
-
Call the cloud function asynchronously.
Declaration
Swift
@discardableResult public static func run( application: LCApplication = .default, _ function: String, parameters: [String: Any]? = nil, completionQueue: DispatchQueue = .main, completion: @escaping (LCGenericResult<Any>) -> Void) -> LCRequest
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
completionQueue
The queue where the
completion
be executed, default is main.completion
Result callback.
-
RPC call the cloud function synchronously.
Declaration
Swift
public static func call( application: LCApplication = .default, _ function: String, parameters: LCDictionaryConvertible? = nil) -> LCValueOptionalResult
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
-
RPC call the cloud function asynchronously.
Declaration
Swift
@discardableResult public static func call( application: LCApplication = .default, _ function: String, parameters: LCDictionaryConvertible? = nil, completionQueue: DispatchQueue = .main, completion: @escaping (LCValueOptionalResult) -> Void) -> LCRequest
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
completionQueue
The queue where the
completion
be executed, default is main.completion
Result callback.
-
RPC call the cloud function synchronously.
Declaration
Swift
public static func call( application: LCApplication = .default, _ function: String, parameters: LCObject) -> LCValueOptionalResult
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
-
RPC call the cloud function asynchronously.
Declaration
Swift
@discardableResult public static func call( application: LCApplication = .default, _ function: String, parameters: LCObject, completionQueue: DispatchQueue = .main, completion: @escaping (LCValueOptionalResult) -> Void) -> LCRequest
Parameters
application
The application.
function
The name of the function in the cloud.
parameters
The parameters passing to the function in the cloud.
completionQueue
The queue where the
completion
be executed, default is main.completion
Result callback.