CalStoreCalendarBundleRequest Class Reference

Inherits from NSObject
Conforms to NSCopying
NSMutableCopying
Declared in CalStoreCalendarBundleRequest.h

Overview

Requests a CalStoreCalendarBundle for an in-app purchase, using a block-based API.

Results

Search Results are returned in the exact same format as a CalStorePage, so the same UI can be used for displaying regular pages as well as search results. The pageType property of a CalStorePage object can be used to differentiate between search results or regular pages: search result pages will have their pageType set to CalStorePageTypeSearchResults.

Creating Requests

Use one of the designated initializers only, using one of the base class initializers won’t work.

Other Methods

  productIdentifier

The productIdentifier for this search, if this is an in-app purchase productIdentifier search request. nil, otherwise.

@property (nonatomic, readonly) NSString *productIdentifier

Discussion

Only available when requestWithSearchByProductIdentifier: or requestWithSearchByProductIdentifier:locale: has been used.

Declared In

CalStoreCalendarBundleRequest.h

Authorization

  authorizationToken

The AuthorizationToken being used for this request. Defaults to [[CalStoreController sharedController]](../Classes/CalStoreController.html#//api/name/sharedController).authorizationToken.

@property (nonatomic, strong) NSString *authorizationToken

Declared In

CalStoreCalendarBundleRequest.h

Fetching the Bundle

– fetchCalendarBundleWithCompletionHandler:

Fetched the requested bundle asynchronously.

- (void)fetchCalendarBundleWithCompletionHandler:(CalStoreCalendarBundleRequestCompletionHandler)completionHandler

Parameters

completionHandler

block that will be invoked on the main queue if the fetch operation finishes. Check the error parameter of the block to see if the request succeeded.

Declared In

CalStoreCalendarBundleRequest.h

  fetching

Yes iff the request is busy fetching the bundle

@property (nonatomic, getter=isFetching, readonly) BOOL fetching

Declared In

CalStoreCalendarBundleRequest.h

Cancelling

– cancel

Cancels this fetch request

- (void)cancel

Declared In

CalStoreCalendarBundleRequest.h

Creating Requests

+ requestWithProductIdentifier:

Creates a request for a bundle by its productIdentifier, locale is are taken from [CalStoreController sharedController].

+ (instancetype)requestWithProductIdentifier:(NSString *)productIdentifier

Parameters

productIdentifier

the productIdentifier of the in-app purchase to get the bundle for. Cannot be nil.

Return Value

CalStoreCalendarBundleRequest that will request the bundle with the given productIdentifier if valid, nil otherwise.

Discussion

Note: this only creates a request, use fetchCalendarBundleWithCompletionHandler: to start requesting the bundle.

Declared In

CalStoreCalendarBundleRequest.h

+ requestWithProductIdentifier:locale:

Creates a request for a bundle by its productIdentifier and a specific locale.

+ (instancetype)requestWithProductIdentifier:(NSString *)productIdentifier locale:(NSString *)locale

Parameters

productIdentifier

the productIdentifier of the in-app purchase to get the bundle for. Cannot be nil.

locale

locale to get the bundle in, ISO 639-1 code, or en_US (style). Can be nil, in which case the CalStoreController’s locale will be used.

Return Value

CalStoreCalendarBundleRequest that will request the bundle with the given productIdentifier if valid, nil otherwise.

Discussion

Note: this only creates a request, use fetchCalendarBundleWithCompletionHandler: to start requesting the bundle.

Declared In

CalStoreCalendarBundleRequest.h