Kiip Class Reference

Inherits from NSObject
Declared in Kiip.h
Kiip.m

Overview

Use the Kiip class to interface your application with the Kiip service.

Accessing Kiip Properties

  shouldAutoRotate

Setting whether or not Kiip views should sync their rotation with the application on their own/

@property (assign, nonatomic) BOOL shouldAutoRotate

Discussion

Setting whether or not Kiip views should sync their rotation with the application on their own/

Declared In

Kiip.h

  interfaceOrientation

The global orientation for all Kiip views. Must set shouldAutoRotate to YES for this to work.

@property (assign, nonatomic) UIInterfaceOrientation interfaceOrientation

Discussion

The global orientation for all Kiip views. Must set shouldAutoRotate to YES for this to work.

Declared In

Kiip.h

  notificationView

The view that will be displayed in a notification.

@property (strong, nonatomic) KPNotificationView *notificationView

Discussion

The view that will be displayed in a notification.

Declared In

Kiip.h

  capabilities

Defines the capabilities that this application is able to support.

@property (strong, nonatomic) NSArray *capabilities

Discussion

Defines the capabilities that this application is able to support.

THIS SHOULD ONLY BE SET BY WRAPPERS

This must be called AFTER setting the delegate to override the automatically detected capabilities.

Use kKPCapabilities_Real, kKPCapabilities_Virtual, kKPCapabilities_Video

Declared In

Kiip.h

  email

The user’s email address. Setting this will auto-populate units with their email address.

@property (strong, nonatomic) NSString *email

Discussion

The user’s email address. Setting this will auto-populate units with their email address.

Declared In

Kiip.h

  gender

The user’s gender. Setting this will help target rewards to your users more effectively.

@property (strong, nonatomic) NSString *gender

Discussion

The user’s gender. Setting this will help target rewards to your users more effectively.

Declared In

Kiip.h

  birthday

The user’s birthday. Setting this will help target rewards to your users more effectively.

@property (strong, nonatomic) NSDate *birthday

Discussion

The user’s birthday. Setting this will help target rewards to your users more effectively.

Declared In

Kiip.h

  deviceIdentifier

The the string Kiip uses to uniquely identify devices.

@property (strong, nonatomic, readonly) NSString *deviceIdentifier

Discussion

The the string Kiip uses to uniquely identify devices.

Declared In

Kiip.h

  testMode

The boolean value to receive test rewards in developement/debug mode. Default is NO.

@property (assign, nonatomic) BOOL testMode

Discussion

The boolean value to receive test rewards in developement/debug mode. Default is NO.

Declared In

Kiip.h

Setting and Getting the Delegate

  delegate

The delegate of the Kiip object.

@property (assign, nonatomic, setter=setDelegate:) id<KiipDelegate> delegate

Discussion

The delegate of the Kiip object.

The delegate must adopt the KiipDelegate formal protocol.

Declared In

Kiip.h

Setting and Getting the Kiip instance

+ sharedInstance

Returns the shared Kiip instance.

+ (Kiip *)sharedInstance

Discussion

Returns the shared Kiip instance.

Declared In

Kiip.h

+ setSharedInstance:

Sets the shared Kiip instance

+ (void)setSharedInstance:(Kiip *)kiip

Parameters

kiip

New shared Kiip instance.

Discussion

Sets the shared Kiip instance

Declared In

Kiip.h

Creating a new Kiip object

– initWithAppKey:andSecret:

Initializes a Kiip object with the specified values.

- (id)initWithAppKey:(NSString *)appKey andSecret:(NSString *)appSecret

Parameters

appKey

The Application’s key.

appSecret

The Application’s secret.

Discussion

Initializes a Kiip object with the specified values.

Declared In

Kiip.h

Saving Moments

– saveMoment:withCompletionHandler:

Saves a moment.

- (void)saveMoment:(NSString *)momentId withCompletionHandler:(void ( ^ ) ( KPPoptart *poptart , NSError *error ))handler

Parameters

momentId

The unique identifier of the moment to be recorded.

handler

A block to be called when the HTTP request asynchronously completes, with a Poptart and an Error. The Poptart may return nil if no reward has been issued. The Error will be nil if the request completed successfully.

Discussion

Saves a moment.

Declared In

Kiip.h

– saveMoment:value:withCompletionHandler:

Saves a moment.

- (void)saveMoment:(NSString *)momentId value:(double)value withCompletionHandler:(void ( ^ ) ( KPPoptart *poptart , NSError *error ))handler

Parameters

momentId

The unique identifier of the moment to be recorded.

value

The value of the moment.

handler

A block to be called when the HTTP request asynchronously completes, with a Poptart and an Error. The Poptart may return nil if no reward has been issued. The Error will be nil if the request completed successfully.

Discussion

Saves a moment.

Declared In

Kiip.h