LCPush
public class LCPush
LeanCloud Push Client
-
Send push notification synchronously.
Declaration
Swift
public static func send( application: LCApplication = .default, data: [String: Any], query: LCQuery? = nil, channels: [String]? = nil, pushDate: Date? = nil, expirationDate: Date? = nil, expirationInterval: TimeInterval? = nil, extraParameters: [String: Any]? = nil) -> LCBooleanResultParameters
applicationThe application, default is
LCApplication.default.dataThe body data of the push message.
queryThe query condition, if this parameter be set, then
channelswill be ignored.channelsThe channels condition, if
querybe set, then this parameter will be ignored.pushDateThe date when to send.
expirationDateThe expiration date of this push notification.
expirationIntervalThe expiration interval from
pushDateof this push notification.extraParametersThe extra parameters, for some specific configuration.
Return Value
Boolean result, see
LCBooleanResult. -
send(application:data: query: channels: pushDate: expirationDate: expirationInterval: extraParameters: completionQueue: completion: ) Send push notification asynchronously.
Declaration
Swift
@discardableResult public static func send( application: LCApplication = .default, data: [String: Any], query: LCQuery? = nil, channels: [String]? = nil, pushDate: Date? = nil, expirationDate: Date? = nil, expirationInterval: TimeInterval? = nil, extraParameters: [String: Any]? = nil, completionQueue: DispatchQueue = .main, completion: @escaping (LCBooleanResult) -> Void) -> LCRequestParameters
applicationThe application, default is
LCApplication.default.dataThe body data of the push message.
queryThe query condition, if this parameter be set, then
channelswill be ignored.channelsThe channels condition, if
querybe set, then this parameter will be ignored.pushDateThe date when to send.
expirationDateThe expiration date of this push notification.
expirationIntervalThe expiration interval from
pushDateof this push notification.extraParametersThe extra parameters, for some specific configuration.
completionQueueThe queue where
completionbe called.completionThe result callback.
Return Value
The request, see
LCRequest.
View on GitHub
Install in Dash
LCPush Class Reference