TIAPurchase Class Reference

Inherits from NSObject
Declared in TIAPurchase.h

Overview

The ‘TIAPurchase’ represents a single connection to In App Purchase to service a request.

+ setDebugMode:

Enable debug mode

+ (void)setDebugMode:(BOOL)isDebuggable

Parameters

isDebuggable

if isDebuggable value is true, Enable to debug mode

Discussion

Enable debug mode

Declared In

TIAPurchase.h

+ setDelegate:

Set purchase delegate

+ (void)setDelegate:(id<TIAPurchaseDelegate>)delegate

Parameters

delegate

The Delegate to receive purchase results

Discussion

Set purchase delegate

Declared In

TIAPurchase.h

+ registerAppId:error:

Simple method to regist appId

+ (BOOL)registerAppId:(NSString *)appId error:(NSError **)error

Parameters

appId

represent appId which is registered in Web Console

error

The ‘NSError’ representing any error that occured

Discussion

Simple method to regist appId

Declared In

TIAPurchase.h

+ registerStoreId:error:

Simple method to regist store id

+ (BOOL)registerStoreId:(NSString *)storeId error:(NSError **)error

Parameters

storeId

represent storeId. you can register ‘AS’ or ‘ONGATE’

error

The ‘NSError’ representing any error that occured

Discussion

Simple method to regist store id

Declared In

TIAPurchase.h

+ registerServerPhase:error:

Simple method to server phase

+ (BOOL)registerServerPhase:(NSString *)serverPhase error:(NSError **)error

Parameters

serverPhase

represent server phase. you can register ‘ALPHA’ or ‘BETA’ or ‘REAL’ (default. REAL)

error

The ‘NSError’ representing any error that occured

Discussion

Simple method to server phase

Declared In

TIAPurchase.h

+ registerUserId:error:

Simple method to register user identification.

+ (BOOL)registerUserId:(NSString *)userId error:(NSError **)error

Parameters

userId

represent to user identification

error

The ‘NSError’ representing any error that occurred.

Discussion

Simple method to register user identification.

Declared In

TIAPurchase.h

+ startPurchaseWithViewController:itemId:completionHandler:

Starts a request for purchase process

+ (instancetype)startPurchaseWithViewController:(UIViewController *)baseViewController itemId:(long)itemId completionHandler:(TIARequestHandler)handler

Parameters

baseViewController

represent to current view controller

itemId

represent to item id

handler

handler’s result has that translation of JSON data to ‘NSDictionany’

Return Value

[result data]

paymentSeq - generated payment id

itemSeq - represent item id

purchaseToken - represent token for validation.

Discussion

Starts a request for purchase process

Declared In

TIAPurchase.h

+ purchasesWithCompletionHandler:

Request purchases, Purchases means the payment is successfully completed, Does not appear in later history is consumed by 3rd party server.

+ (instancetype)purchasesWithCompletionHandler:(TIARequestHandler)handler

Parameters

handler

handler’s result has that translation of JSON data to ‘NSArray’

Return Value

[data of array]

paymentSeq - generated payment id

itemSeq - represent item id

purchaseToken - represent token for validation.

Discussion

Request purchases, Purchases means the payment is successfully completed, Does not appear in later history is consumed by 3rd party server.

Declared In

TIAPurchase.h

+ itemListWithCompletionHandler:

Request for item list which is registered in webConsole and in itunesConnect

+ (instancetype)itemListWithCompletionHandler:(TIARequestHandler)handler

Parameters

handler

handler’s result has that translation of JSON data to ‘NSArray’

Return Value

[result data of array]

itemSeq - item id

itemName - item name

usingStatus - item status on IAP server

regYmdt - item registration date on IAP server

appName - app name

marketId - market id (AS : APPLE STORE)

marketItemId - market item id (product id)

currency - represent to item currency

price - represent to item price

localizedPrice - represent to localized item price

Discussion

Request for item list which is registered in webConsole and in itunesConnect

Declared In

TIAPurchase.h

+ getTCConsoleItemsWithCompletionHandler:

Request for item list which is registered in webConsole but not in itunesConnect

+ (instancetype)getTCConsoleItemsWithCompletionHandler:(TIARequestHandler)handler

Parameters

handler

handler’s result has that translation of JSON data to ‘NSArray’

Return Value

[result data of array]

itemSeq - item id

itemName - item name

usingStatus - item status on IAP server

regYmdt - item registration date on IAP server

appName - app name

marketId - market id (AS : APPLE STORE)

marketItemId - market item id (product id)

Discussion

Request for item list which is registered in webConsole but not in itunesConnect

Declared In

TIAPurchase.h

+ processesIncompletePurchasesWithCompletionHandler:

Request processes IncompletePurchases

+ (instancetype)processesIncompletePurchasesWithCompletionHandler:(TIARequestHandler)handler

Parameters

handler

handler’s result has that translation of JSON data to ‘NSDictionany’

Return Value

[result data of NSDictionany]

successList - success data of ‘NSArray’

failList - fail data of ‘NSArray’

[list data of NSArray(successList or failList)]

paymentSeq - generated payment id

itemSeq - represent item id

purchaseToken - represent token for validation

marketItemId - market item id (product id)

currency - represent to item currency

price - represent to item price

Discussion

Request processes IncompletePurchases

Declared In

TIAPurchase.h

+ sdkVersion

Return SDK Version

+ (NSString *)sdkVersion

Return Value

SDK Version

Discussion

Return SDK Version

Declared In

TIAPurchase.h