![]() |
Ignite Tools
|
This class provides the primary interface for interacting with the Urban Airship subscription functionality. More...
#import <UASubscriptionManager.h>
Properties | |
Inventory | |
--------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- | |
UASubscriptionInventory * | inventory |
The inventory of subscriptions (and their products and contents) | |
UASubscriptionProduct * | pendingProduct |
Downloads | |
--------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- | |
UASubscriptionDownloadManager * | downloadManager |
Singleton | |
--------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- | |
(UASubscriptionManager *) | + shared |
Singleton initializer. | |
(void) | - forceRelease |
UI and Initialization | |
--------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- | |
(void) | + useCustomUI: |
(void) | + displaySubscription:animated: |
(void) | + hideSubscription |
(void) | + land |
(BOOL) | + setDownloadDirectory: |
Set a custom download directory, creating it if necessary. | |
(BOOL) | + setDownloadDirectory:withProductIDSubdir: |
Set a custom download directory. | |
(Class) | - uiClass |
Purchase and Restore Subscriptions | |
--------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------- | |
UASubscriptionObserver * | transactionObserver |
(void) | - purchase: |
Purchase a subscription product. | |
(void) | - purchaseProductWithId: |
Purchase a subscription product. | |
(void) | - setPendingSubscription: |
(void) | - purchasePendingSubscription |
(void) | - restoreAutorenewables |
Restores all autorenewable purchases for this user. | |
(void) | - loadSubscription |
Loads the product inventory, the available content and the user's purchases. | |
(void) | - enterForeground |
(void) | - enterBackground |
(void) | - subscriptionWillEnterForeground |
(void) | - subscriptionWillEnterBackground |
(void) | - subscriptionsUpdated: |
(void) | - userSubscriptionsUpdated: |
(void) | - inventoryUpdateFailedWithError: |
(void) | - purchaseProductFinished: |
(void) | - purchaseProductFailed:withError: |
(void) | - downloadContentFinished: |
(void) | - downloadContentFailed: |
(void) | - restoreAutorenewablesFinished: |
(void) | - restoreAutorenewableProductFailed: |
(void) | - restoreAutorenewablesFailedWithError: |
This class provides the primary interface for interacting with the Urban Airship subscription functionality.
It provides support for both autorenewable and non-autorenewable subscriptions.
Register a UASubscriptionManagerObserver to receive notifications when products, subsriptions or their contents change.
- (void) loadSubscription |
Loads the product inventory, the available content and the user's purchases.
This is an asynchronous task. Register a UASubscriptionManagerObserver to receive status updates for this process.
- (void) purchase: | (UASubscriptionProduct *) | product |
Purchase a subscription product.
Register a UASubscriptionManagerObserver to receive status updates for this process.
product | The subscription product to purchase |
- (void) purchaseProductWithId: | (NSString *) | productId |
Purchase a subscription product.
Register a UASubscriptionManagerObserver to receive status updates for this process.
product | The product ID to purchase |
- (void) restoreAutorenewables |
Restores all autorenewable purchases for this user.
This triggers a StoreKit restore process, which requests receipts for all the autorenewable subscription products that this user has ever purchased.
Once received, the receipts are submitted to Urban Airship so that the appropriate access may be granted. If the user is restoring purchases from another device, this device's user will be merged into the original UA user based on their iTunes account.
Register a UASubscriptionManagerObserver to receive status updates for this process.
+ (BOOL) setDownloadDirectory: | (NSString *) | path |
Set a custom download directory, creating it if necessary.
Creates a product ID subdirectory if the product ID is specified in the Urban Airship content information.
The default directory is defined as kUADownloadDirectory: <library directory>="">/ua/downloads/
path | The custom download directory (with trailing slash) |
+ (BOOL) setDownloadDirectory: | (NSString *) | path | |
withProductIDSubdir: | (BOOL) | makeSubdir | |
Set a custom download directory.
Optionally creates a product ID subdirectory if the product ID is specified in the Urban Airship content information.
The default directory is defined as kUADownloadDirectory: <library directory>="">/ua/downloads/
path | The custom download directory (with trailing slash) |
makeSubdir | If YES, creates a subdirectory named with the content key *OR* the product ID, if available |
+ (UASubscriptionManager*) shared |
Singleton initializer.