JubeatPlus 3.9.11
Loading...
Searching...
No Matches
PurchaseManager Class Reference

The StoreKit purchase and restore front end, shared across the store screens. More...

#include <PurchaseManager.h>

Inheritance diagram for PurchaseManager:
Collaboration diagram for PurchaseManager:

Instance Methods

(instancetype) - init
 Builds the manager.
(void) - start
 Brings the purchase manager up.
(BOOL) - isPurchased:
 Whether the product has already been bought.
(BOOL) - isPending:
 Whether a purchase of the product is in flight.
(void) - beginConsumePurchase:
 Start a consumable purchase (bConsume = YES).
(void) - beginPurchase:
 Start a non-consumable purchase, or refresh receipt if already pending.
(void) - beginRestore
 Begin restoring completed transactions.
(void) - addProduct:
 Add a product to purchasedProducts if not already present, and clear pending.
(nullable NSDictionary *) - createConsumeVerifyPostDictionary:prices:
 Create a consume-verify post dictionary.
(nullable NSData *) - createVerifyPostData:
 Create verify post data for given products.
(nullable NSDictionary *) - createVerifyPostDictionary:productPrices:
 Create verify post dictionary with product prices.
(void) - verifyReceipt
 Verify the receipt for the current verifingID/Price.
(void) - paymentQueue:restoreCompletedTransactionsFailedWithError:
 Handle a failed receipt restore.
(void) - requestDidFinish:
 Handle a finished SKRequest.
(void) - savePendingConsumeList
 Save pending consumable receipts.
(void) - loadPendingConsumeList
 Load pending consumable receipts.
(void) - verifyConsumeReceipt
 Verify the consumable receipt.
(BOOL) - verifyPendingConsumeReceipt
 Verify any pending consumable receipt.
(BOOL) - checkConsumeItemID:
 Check if an item ID is a consumable cube.
(void) - alertSelect:
 Handle an alert selection for a consumable.
(void) - dealloc
 Tears down the manager and clears the delegate.
(void) - loadProductList
 Loads the product catalogue.
(void) - loadPendingList
 Loads purchases that were started but not finished.
(void) - end
 Tears the purchase manager down.

Class Methods

(BOOL) + isPurchasable
 Whether the device can make payments.

Properties

id< PurchaseManagerDelegate > delegate
 The delegate.
PurchaseManager * sharedManager
 The shared instance.
NSArray * purchasedPackIDs
 The packs the player has bought.
NSArray * pendingPackIDs
 The packs whose purchase has not settled yet.

Detailed Description

The StoreKit purchase and restore front end, shared across the store screens.

Method Documentation

◆ addProduct:

- (void) addProduct: (NSString *) productID

Add a product to purchasedProducts if not already present, and clear pending.

Parameters
productIDThe product identifier.
Ghidra address:
0xb6308
Ghidra address:
0xb6308

◆ alertSelect:

- (void) alertSelect: (id) alert

Handle an alert selection for a consumable.

Parameters
alertThe alert.
Ghidra address:
0xb9644
Ghidra address:
0xb9644

◆ beginConsumePurchase:

- (void) beginConsumePurchase: (SKProduct *) product

Start a consumable purchase (bConsume = YES).

Parameters
productThe SKProduct.
Ghidra address:
0xb5ec8
Ghidra address:
0xb5ec8

◆ beginPurchase:

- (void) beginPurchase: (SKProduct *) product

Start a non-consumable purchase, or refresh receipt if already pending.

Parameters
productThe SKProduct.
Ghidra address:
0xb5fec
Ghidra address:
0xb5fec

◆ beginRestore

- (void) beginRestore

Begin restoring completed transactions.

Ghidra address:
0xb6238

◆ checkConsumeItemID:

- (BOOL) checkConsumeItemID: (NSString *) itemID

Check if an item ID is a consumable cube.

Parameters
itemIDThe item ID.
Returns
YES if it has the jubeat.cube prefix.
Ghidra address:
0xb9628
Ghidra address:
0xb9628

◆ createConsumeVerifyPostDictionary:prices:

- (NSDictionary *) createConsumeVerifyPostDictionary: (NSString *) sku
prices: (NSArray *) prices 

Create a consume-verify post dictionary.

Parameters
skuThe SKU.
pricesThe prices array.
Returns
The dictionary or nil.
Ghidra address:
0xb63bc
Ghidra address:
0xb63bc

◆ createVerifyPostData:

- (NSData *) createVerifyPostData: (NSArray *) products

Create verify post data for given products.

Parameters
productsThe products array.
Returns
The dictionary or nil.
Ghidra address:
0xb66ec
Ghidra address:
0xb66ec

◆ createVerifyPostDictionary:productPrices:

- (nullable NSDictionary *) createVerifyPostDictionary: (NSArray *) products
productPrices: (nullable NSArray *) productPrices 

Create verify post dictionary with product prices.

Parameters
productsThe products array.
productPricesThe prices array.
Returns
The dictionary or nil.
Ghidra address:
0xb6af0

◆ dealloc

- (void) dealloc

Tears down the manager and clears the delegate.

Ghidra address:
0xb96a4

◆ end

- (void) end

Tears the purchase manager down.

Removes itself as a transaction observer.

Ghidra address:
0xb5194
Ghidra address:
0xb5194

◆ init

- (instancetype) init

Builds the manager.

Returns
The initialised manager.
Ghidra address:
0xb50e8
Ghidra address:
0xb50e8

◆ isPending:

- (BOOL) isPending: (nullable NSString *) productID

Whether a purchase of the product is in flight.

Parameters
productIDThe product identifier.
Returns
YES if a receipt is pending.
Ghidra address:
0xb61f0

◆ isPurchasable

+ (BOOL) isPurchasable

Whether the device can make payments.

Returns
YES when StoreKit says so.
Ghidra address:
0xb5130
Ghidra address:
0xb5130

◆ isPurchased:

- (BOOL) isPurchased: (nullable NSString *) productID

Whether the product has already been bought.

Parameters
productIDThe product identifier.
Returns
YES if contained in purchasedProducts.
Ghidra address:
0xb61d8

◆ loadPendingConsumeList

- (void) loadPendingConsumeList

Load pending consumable receipts.

Ghidra address:
0xb8dc8

◆ loadPendingList

- (void) loadPendingList

Loads purchases that were started but not finished.

Ghidra address:
0xb5c04

◆ loadProductList

- (void) loadProductList

Loads the product catalogue.

Ghidra address:
0xb56f0

◆ paymentQueue:restoreCompletedTransactionsFailedWithError:

- (void) paymentQueue: (SKPaymentQueue *) queue
restoreCompletedTransactionsFailedWithError: (NSError *) error 

Handle a failed receipt restore.

Parameters
queueThe payment queue.
errorThe error.
Ghidra address:
0xb8970
Ghidra address:
0xb8970

◆ requestDidFinish:

- (void) requestDidFinish: (SKRequest *) request

Handle a finished SKRequest.

Parameters
requestThe request.
Ghidra address:
0xb8a34
Ghidra address:
0xb8a34

◆ savePendingConsumeList

- (void) savePendingConsumeList

Save pending consumable receipts.

Ghidra address:
0xb8b78

◆ start

- (void) start

Brings the purchase manager up.

Adds itself as a transaction observer on the default queue.

Ghidra address:
0xb5144
Ghidra address:
0xb5144

◆ verifyConsumeReceipt

- (void) verifyConsumeReceipt

Verify the consumable receipt.

Ghidra address:
0xb908c

◆ verifyPendingConsumeReceipt

- (BOOL) verifyPendingConsumeReceipt

Verify any pending consumable receipt.

Returns
YES if an unfinished cube purchase was found and its alert was shown.
Ghidra address:
0xb92b4
Ghidra address:
0xb92b4

◆ verifyReceipt

- (void) verifyReceipt

Verify the receipt for the current verifingID/Price.

Ghidra address:
0xb6ec4

Property Documentation

◆ delegate

- (id<PurchaseManagerDelegate>) delegate
readwritenonatomicweak

The delegate.

Ghidra address:
0x34a4e8

◆ pendingPackIDs

- (NSArray *) pendingPackIDs
readnonatomicassign

The packs whose purchase has not settled yet.

Ghidra address:
0xb5354
Ghidra address:
0xb5420

◆ purchasedPackIDs

- (NSArray *) purchasedPackIDs
readnonatomicassign

The packs the player has bought.

Ghidra address:
0xb51e4
Ghidra address:
0xb52b0

◆ sharedManager

- (PurchaseManager *) sharedManager
readnonatomicassign

The shared instance.

Ghidra address:
0xb5068
Ghidra address:
0xb50a8

The documentation for this class was generated from the following files: