S
S
S Pankov2012-01-18 13:08:57
iOS
S Pankov, 2012-01-18 13:08:57

How to set up In-App Purchases?

What settings do I need to make in iTunes Connect to make In-App Purchases work?
I created several payments, I'm trying to do the following:

  1. - (void)viewDidLoad
  2. {
  3.     [superviewDidLoad];
  4.  
  5. if ([SKPaymentQueue canMakePayments]) {
  6. [self requestProductData];
  7. } else {
  8. NSLog(@"none!");
  9. }
  10. }
  11.  
  12. -(void) requestProductData {
  13. SKProductsRequest* request = ;
  14. request.delegate = self;
  15. [request start];
  16. [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
  17. }
  18.  
  19. #pragma mark - StoreKit Delegate methods
  20.  
  21. -(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
  22. [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
  23. NSArray* myProduct = response.products;
  24. NSLog(@"length: %d", [myProduct count]);
  25. NSLog(@"my products: %@", myProduct);
  26. }

As a result, length: 0
and an empty array my prods will be displayed in the console.
I run it on a device with Internet enabled. On the device from the store is logged out.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
S Pankov, 2012-01-18
@seocoder

Solution found. After running on the ipod, everything began to work everywhere.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question