Skip to content

Instantly share code, notes, and snippets.

@joshtwist
Created April 8, 2013 07:15
Show Gist options
  • Select an option

  • Save joshtwist/5334845 to your computer and use it in GitHub Desktop.

Select an option

Save joshtwist/5334845 to your computer and use it in GitHub Desktop.
- (void)loadProducts:(QSCompletionBlock)completion;
- (void)loadProducts:(QSCompletionBlock)completion
{
[self.productsTable readWithCompletion:^(NSArray *results, NSInteger totalCount, NSError *error) {
self.loadProductsComplete = completion;
self.productData = results;
NSArray *productIds = [results valueForKey:@"productId"];
SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIds]];
request.delegate = self;
[request start];
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment