LCPush

Objective-C

@interface LCPush : NSObject

Swift

class LCPush : NSObject

Undocumented

Creating a Push Notification */

  • 创建一个 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.

Configuring a Push Notification */

  • 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)setQuery:(nonnull LCQuery *)query;

    Swift

    func setQuery(_ query: LCQuery)
  • 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()

Sending Push Notifications */

Handling Notifications */