Inherits from NSObject
Declared in KiiPushInstallation.h

Overview

Install APNS feature on user scope

Class Methods

install:withCallback:

Asynchronously install APNS feature. Install asynchronously using delegate and callback. This method is non-blocking. (Deprecated: This mehod is deprecated. Use [KiiPushInstallation installWithDeviceToken:andDevelopmentMode:andDelegate:andCallback:] instead.)

+ (void)install:(id)delegate withCallback:(SEL)callback

Parameters

delegate

The object to make any callback requests to

callback

The callback method to be called when the request is completed. The callback method should have a signature similar to:

    - (void)installCompleted:(KiiPushInstallation *) installation withError: (NSError *) error {
        if (nil == error) {
            NSLog(@" Installation succeeded");
        }
    }

Discussion

Asynchronously install APNS feature. Install asynchronously using delegate and callback. This method is non-blocking.

Declared In

KiiPushInstallation.h

installSynchronous:

Synchronously installs APNS feature. Install APNS using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is blocking method. (Deprecated: This mehod is deprecated. Use [KiiPushInstallation installSynchronousWithDeviceToken:andDevelopmentMode:andError:] instead.)

+ (nullable KiiPushInstallation *)installSynchronous:(NSError *_Nullable *_Nullable)error

Parameters

error

used to return an error by reference (pass NULL if this is not desired). It is recommended to set an actual error object to get the error information.

Discussion

Synchronously installs APNS feature. Install APNS using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is blocking method.

Declared In

KiiPushInstallation.h

installSynchronousWithDeviceToken:andDevelopmentMode:andError:

Synchronously installs APNS feature with device token and development mode. This method is blocking method.

+ (nullable KiiPushInstallation *)installSynchronousWithDeviceToken:(NSData *)deviceToken andDevelopmentMode:(BOOL)isDevelopmentMode andError:(NSError *_Nullable *_Nullable)error

Parameters

deviceToken

device token that is given by APNS server.

isDevelopmentMode

YES if APNS development environment mode or NO for production mode.

error

used to return an error by reference (pass NULL if this is not desired). It is recommended to set an actual error object to get the error information.

Discussion

Synchronously installs APNS feature with device token and development mode. This method is blocking method.

Exceptions

NSInvalidArgumentException

Thrown if given deviceToken is nil.

Declared In

KiiPushInstallation.h

installWithBlock:

Asynchronously install APNS feature. Install APNS using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is non-blocking method. (Deprecated: This mehod is deprecated. Use [KiiPushInstallation installWithDeviceToken:andDevelopmentMode:andCompletion:] instead.)

+ (void)installWithBlock:(KiiPushCallbackBlock)completion

Parameters

completion

Block for installation process

Discussion

Asynchronously install APNS feature. Install APNS using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is non-blocking method.

[KiiPushInstallation installWithBlock:^(KiiPushInstallation *installation, NSError *error) {
    // do something with the result
}];

Declared In

KiiPushInstallation.h

installWithDeviceToken:andDevelopmentMode:andCompletion:

Asynchronously install APNS feature with device token and development mode. This method is non-blocking method.

+ (void)installWithDeviceToken:(NSData *)deviceToken andDevelopmentMode:(BOOL)isDevelopmentMode andCompletion:(KiiPushCallbackBlock)completion

Parameters

deviceToken

device token that is given by APNS server.

isDevelopmentMode

YES if APNS development environment mode or NO for production mode.

completion

Block for installation process.

Discussion

Asynchronously install APNS feature with device token and development mode. This method is non-blocking method.

[KiiPushInstallation installWithDeviceToken:deviceToken andDevelopmentMode:YES andCompletion:^(KiiPushInstallation *installation, NSError *error) {
// do something with the result
}];

Exceptions

NSInvalidArgumentException

Thrown if given deviceToken is nil.

Declared In

KiiPushInstallation.h

installWithDeviceToken:andDevelopmentMode:andDelegate:andCallback:

Asynchronously install APNS feature with device token and development mode. Install asynchronously using delegate and callback. This method is non-blocking.

+ (void)installWithDeviceToken:(NSData *)deviceToken andDevelopmentMode:(BOOL)isDevelopmentMode andDelegate:(id)delegate andCallback:(SEL)callback

Parameters

deviceToken

device token that is given by APNS server.

isDevelopmentMode

YES if APNS development environment mode or NO for production mode.

delegate

The object to make any callback requests to.

callback

The callback method to be called when the request is completed. The callback method should have a signature similar to:

    - (void)installCompleted:(KiiPushInstallation *) installation withError: (NSError *) error {
        if (nil == error) {
            NSLog(@" Installation succeeded");
        }
    }

Discussion

Asynchronously install APNS feature with device token and development mode. Install asynchronously using delegate and callback. This method is non-blocking.

Exceptions

NSInvalidArgumentException

Thrown if given deviceToken is nil.

Declared In

KiiPushInstallation.h

uninstallSynchronous:

Synchronously uninstall APNs feature. Uninstall APNs using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is blocking method. (Deprecated: This mehod is deprecated. Use [KiiPushInstallation uninstallSynchronousWithDeviceToken:andError:] instead.)

+ (nullable KiiPushInstallation *)uninstallSynchronous:(NSError *_Nullable *_Nullable)error

Parameters

error

used to return an error by reference (pass NULL if this is not desired). It is recommended to set an actual error object to get the error information.

Discussion

Synchronously uninstall APNs feature. Uninstall APNs using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is blocking method.

Declared In

KiiPushInstallation.h

uninstallSynchronousWithDeviceToken:andError:

Synchronously uninstall APNs featurefor given device token. This method is blocking method.

+ (nullable KiiPushInstallation *)uninstallSynchronousWithDeviceToken:(NSData *)deviceToken andError:(NSError *_Nullable *_Nullable)error

Parameters

deviceToken

device token that is given by APNS server.

error

used to return an error by reference (pass NULL if this is not desired). It is recommended to set an actual error object to get the error information.

Discussion

Synchronously uninstall APNs featurefor given device token. This method is blocking method.

Exceptions

NSInvalidArgumentException

Thrown if given deviceToken is nil.

Declared In

KiiPushInstallation.h

uninstallWithBlock:

Asynchronously uninstall APNs feature. Uninstall APNs using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is non-blocking method. (Deprecated: This mehod is deprecated. Use [KiiPushInstallation uninstallWithDeviceToken:andCompletion:] instead.)

+ (void)uninstallWithBlock:(KiiPushCallbackBlock)completion

Parameters

completion

Block for uninstallation process

Discussion

Asynchronously uninstall APNs feature. Uninstall APNs using deviceToken captured by Kii +(void) setAPNSDeviceToken. This method is non-blocking method.

[KiiPushInstallation uninstallWithBlock:^(KiiPushInstallation *uninstallation, NSError *error) {
    // do something with the result
    if (error == nil) {
        NSLog(@" Uninstallation succeeded");
    }
}];

Declared In

KiiPushInstallation.h

uninstallWithDeviceToken:andCompletion:

Asynchronously uninstall APNs feature for given device token. This method is non-blocking method.

+ (void)uninstallWithDeviceToken:(NSData *)deviceToken andCompletion:(KiiPushCallbackBlock)completion

Parameters

deviceToken

device token that is given by APNS server.

completion

Block for uninstallation process.

Discussion

Asynchronously uninstall APNs feature for given device token. This method is non-blocking method.

[KiiPushInstallation uninstallWithDeviceToken: deviceToken andCompletion:^(KiiPushInstallation *uninstallation, NSError *error) {
// do something with the result
    if (error == nil) {
        NSLog(@" Uninstallation succeeded");
    }
}];

Exceptions

NSInvalidArgumentException

Thrown if given deviceToken is nil.

Declared In

KiiPushInstallation.h