LCPush
Objective-C
@interface LCPush : NSObject
Swift
class LCPush : NSObject
Undocumented
-
创建一个 LCPush 对象
Declaration
Objective-C
+ (nonnull instancetype)push;
Return Value
LCPush 对象
-
Set call what production mode’s cloud code
Declaration
Objective-C
+ (void)setProductionMode:(BOOL)isProduction;
Swift
class func setProductionMode(_ isProduction: Bool)
Parameters
isProduction
the production mode or test mode
-
Default is false, if set true, LCPush will remove ‘prod’ Key-Value.
Declaration
Objective-C
+ (void)setIgnoreProdParameterEnabled:(BOOL)isIgnoreProd;
Swift
class func setIgnoreProdParameterEnabled(_ isIgnoreProd: Bool)
Parameters
isIgnoreProd
trigger.
-
Undocumented
Declaration
Objective-C
- (void)setChannel:(nonnull NSString *)channel;
Swift
func setChannel(_ channel: String)
-
Undocumented
Declaration
Objective-C
- (void)setChannels:(nonnull NSArray *)channels;
Swift
func setChannels(_ channels: [Any])
-
Undocumented
Declaration
Objective-C
- (void)setMessage:(nonnull NSString *)message;
Swift
func setMessage(_ message: String)
-
Undocumented
Declaration
Objective-C
- (void)setData:(nonnull NSDictionary *)data;
Swift
func setData(_ data: [AnyHashable : Any])
-
Sets push target platforms.
Declaration
Objective-C
- (void)setPushToTargetPlatforms:(nonnull NSArray *)platforms;
Swift
func setPushToTargetPlatforms(_ platforms: [Any])
Parameters
platforms
Target platforms. Value maybe in kLCPushTargetPlatformIOS,kLCPushTargetPlatformAndroid,kLCPushTargetPlatformWindowsPhone
-
Sets whether this push will go to Android devices.
Declaration
Objective-C
- (void)setPushToAndroid:(BOOL)pushToAndroid;
Swift
func setPushToAndroid(_ pushToAndroid: Bool)
Parameters
pushToAndroid
Defaults to true.
-
Sets whether this push will go to iOS devices
Declaration
Objective-C
- (void)setPushToIOS:(BOOL)pushToIOS;
Swift
func setPushToIOS(_ pushToIOS: Bool)
Parameters
pushToIOS
Defaults to true
-
Sets whether this push will go to WinPhone devices.
Declaration
Objective-C
- (void)setPushToWP:(BOOL)pushToWP;
Swift
func setPushToWP(_ pushToWP: Bool)
Parameters
pushToWP
Defaults to true.
-
Sets to push at sometime
Declaration
Objective-C
- (void)setPushDate:(nonnull NSDate *)dateToPush;
Swift
func setPush(_ dateToPush: Date)
Parameters
dateToPush
Defaults is now.
-
Undocumented
Declaration
Objective-C
- (void)expireAtDate:(nonnull NSDate *)date;
Swift
func expire(at date: Date)
-
Undocumented
Declaration
Objective-C
- (void)expireAfterTimeInterval:(NSTimeInterval)timeInterval;
Swift
func expire(afterTimeInterval timeInterval: TimeInterval)
-
Undocumented
Declaration
Objective-C
- (void)clearExpiration;
Swift
func clearExpiration()
-
Undocumented
Declaration
Objective-C
+ (BOOL)sendPushMessageToChannel:(nonnull NSString *)channel withMessage:(nonnull NSString *)message error:(NSError *_Nullable *_Nullable)error;
Swift
class func sendMessage(toChannel channel: String, withMessage message: String) throws
-
Undocumented
Declaration
Objective-C
+ (void)sendPushMessageToChannelInBackground:(nonnull NSString *)channel withMessage:(nonnull NSString *)message;
Swift
class func sendMessageToChannel(inBackground channel: String, withMessage message: String)
-
Undocumented
Declaration
Objective-C
+ (void)sendPushMessageToChannelInBackground:(nonnull NSString *)channel withMessage:(nonnull NSString *)message block: (nonnull LCBooleanResultBlock)block;
Swift
class func sendMessageToChannel(inBackground channel: String, withMessage message: String, block: @escaping LCBooleanResultBlock)
-
Undocumented
Declaration
Objective-C
+ (void)sendPushMessageToQueryInBackground:(nonnull LCQuery *)query withMessage:(nonnull NSString *)message block:(nonnull LCBooleanResultBlock)block;
Swift
class func sendMessageToQuery(inBackground query: LCQuery, withMessage message: String, block: @escaping LCBooleanResultBlock)
-
Undocumented
Declaration
Objective-C
- (BOOL)sendPush:(NSError *_Nullable *_Nullable)error;
Swift
func send() throws
-
Undocumented
Declaration
Objective-C
- (BOOL)sendPushAndThrowsWithError:(NSError *_Nullable *_Nullable)error;
Swift
func sendAndThrows() throws
-
Undocumented
Declaration
Objective-C
- (void)sendPushInBackground;
Swift
func sendInBackground()
-
Undocumented
Declaration
Objective-C
- (void)sendPushInBackgroundWithBlock:(nonnull LCBooleanResultBlock)block;
Swift
func sendInBackground() async throws -> Bool
-
Undocumented
Declaration
Objective-C
+ (BOOL)sendPushDataToChannel:(nonnull NSString *)channel withData:(nonnull NSDictionary *)data error:(NSError *_Nullable *_Nullable)error;
Swift
class func sendData(toChannel channel: String, withData data: [AnyHashable : Any]) throws
-
Undocumented
Declaration
Objective-C
+ (void)sendPushDataToChannelInBackground:(nonnull NSString *)channel withData:(nonnull NSDictionary *)data;
Swift
class func sendDataToChannel(inBackground channel: String, withData data: [AnyHashable : Any])
-
Undocumented
Declaration
Objective-C
+ (void)sendPushDataToChannelInBackground:(nonnull NSString *)channel withData:(nonnull NSDictionary *)data block:(nonnull LCBooleanResultBlock)block;
Swift
class func sendDataToChannel(inBackground channel: String, withData data: [AnyHashable : Any], block: @escaping LCBooleanResultBlock)
-
Undocumented
Declaration
Objective-C
+ (void)sendPushDataToQueryInBackground:(nonnull LCQuery *)query withData:(nonnull NSDictionary *)data block:(nonnull LCBooleanResultBlock)block;
Swift
class func sendDataToQuery(inBackground query: LCQuery, withData data: [AnyHashable : Any], block: @escaping LCBooleanResultBlock)
-
Undocumented
Declaration
Objective-C
+ (nullable NSSet *)getSubscribedChannels:(NSError *_Nullable *_Nullable)error;
Swift
class func getSubscribedChannels() throws -> Set<AnyHashable>
-
Undocumented
Declaration
Objective-C
+ (nullable NSSet *)getSubscribedChannelsAndThrowsWithError: (NSError *_Nullable *_Nullable)error;
Swift
class func getSubscribedChannelsAndThrows() throws -> Set<AnyHashable>
-
Undocumented
Declaration
Objective-C
+ (void)getSubscribedChannelsInBackgroundWithBlock: (nonnull LCSetResultBlock)block;
Swift
class func subscribedChannelsInBackground() async throws -> Set<AnyHashable>
-
Undocumented
Declaration
Objective-C
+ (BOOL)subscribeToChannel:(nonnull NSString *)channel error:(NSError *_Nullable *_Nullable)error;
Swift
class func subscribe(toChannel channel: String) throws
-
Undocumented
Declaration
Objective-C
+ (void)subscribeToChannelInBackground:(nonnull NSString *)channel;
Swift
class func subscribeToChannel(inBackground channel: String)
-
Undocumented
Declaration
Objective-C
+ (void)subscribeToChannelInBackground:(nonnull NSString *)channel block:(nonnull LCBooleanResultBlock)block;
Swift
class func subscribeToChannel(inBackground channel: String, block: @escaping LCBooleanResultBlock)
-
Undocumented
Declaration
Objective-C
+ (BOOL)unsubscribeFromChannel:(nonnull NSString *)channel error:(NSError *_Nullable *_Nullable)error;
Swift
class func unsubscribe(fromChannel channel: String) throws
-
Undocumented
Declaration
Objective-C
+ (void)unsubscribeFromChannelInBackground:(nonnull NSString *)channel;
Swift
class func unsubscribeFromChannel(inBackground channel: String)
-
Undocumented
Declaration
Objective-C
+ (void)unsubscribeFromChannelInBackground:(nonnull NSString *)channel block:(nonnull LCBooleanResultBlock)block;
Swift
class func unsubscribeFromChannel(inBackground channel: String, block: @escaping LCBooleanResultBlock)