<!--
{
  "documentType" : "article",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/fetching-product-information-from-the-app-store",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Fetching product information from the App Store"
}
-->

# Fetching product information from the App Store

Retrieve up-to-date information about the products for sale in your app to display to your customers.

## Discussion

To ensure your customers see only products that are available for them to purchase, query the App Store before displaying your app’s store UI. Compare the App Store’s list of product identifiers to your local product identifiers. To retrieve a list of your app’s product identifiers, see [Loading in-app product identifiers](/documentation/StoreKit/loading-in-app-product-identifiers).

### Request product information

To query the App Store, create an [`SKProductsRequest`](/documentation/StoreKit/SKProductsRequest) and initialize it with a list of your product identifiers. Keep a strong reference to the request object; otherwise, the system might deallocate the request before it can complete.

The products request retrieves information about valid products, along with a list of invalid product identifiers, and then calls its delegate to process the result. The delegate needs to implement the [`SKProductsRequestDelegate`](/documentation/StoreKit/SKProductsRequestDelegate) protocol to handle the response from the App Store. Here’s a simple implementation of both pieces of code:

```objc
// Custom method.
- (void)validateProductIdentifiers:(NSArray *)productIdentifiers
{
    SKProductsRequest *productsRequest = [[SKProductsRequest alloc]
        initWithProductIdentifiers:[NSSet setWithArray:productIdentifiers]];

    // Keep a strong reference to the request.
    self.request = productsRequest;
    productsRequest.delegate = self;
    [productsRequest start];
}

// SKProductsRequestDelegate protocol method.
- (void)productsRequest:(SKProductsRequest *)request
didReceiveResponse:(SKProductsResponse *)response
{
    self.products = response.products;

    for (NSString *invalidIdentifier in response.invalidProductIdentifiers) {
        // Handle any invalid product identifiers.
    }

    [self displayStoreUI]; // Custom method.
}
```

Keep a reference to the array of [`SKProduct`](/documentation/StoreKit/SKProduct) objects that the delegate receives. Use these same product objects to create a payment request when a user purchases a product.

If the list of products you sell in your app is subject to change, such as when you add or remove a product from sale, consider creating a custom class that encapsulates a reference to the product object along with other information, such as pictures or descriptions that you fetch from your server. For more information on payment requests, see [Requesting a payment from the App Store](/documentation/StoreKit/requesting-a-payment-from-the-app-store).

### Troubleshoot invalid product IDs

Invalid product identifiers in the App Store response to your products request usually indicate an error in your app’s list of product identifiers. Invalid product identifiers may also indicate an incorrectly configured product in App Store Connect. Actionable UI and insightful logging can help you resolve this type of issue, as follows:

- In production builds, display your app’s store UI and omit the invalid product.
- In development builds, display an error to call attention to the issue.
- In both production and development builds, use <doc://com.apple.documentation/documentation/Foundation/NSLog(_:_:)> to write a message to the console to record the invalid identifier.
- If your app fetches the list from your server, you can define a logging mechanism to let your app send the list of invalid identifiers back to your server.
- Verify that you have a signed Paid Applications Agreement for your developer account. For more information about this agreement, see [Sign and update agreements](https://help.apple.com/app-store-connect/#/deva001f4a14).

For more information about troubleshooting invalid product identifiers, see [`invalidProductIdentifiers`](/documentation/StoreKit/SKProductsResponse/invalidProductIdentifiers).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)