In-App Purchase Product Identifiers
Q: I am implementing In-App Purchase and must register my product identifiers. What are product identifiers and how do I create and use them in my application?
A: A product identifier is a string used to uniquely identify every product you wish to sell from your application. The App Store uses it to retrieve information about a product. It is a string identifier that can only contain alphanumeric (A-Z,a-z,0-9), underscore (_), and period (.) characters. You can use any sequence of these characters for your identifier. However, we recommend that you use the reverse domain name style (for example,
com.companyname.application.productid) when creating your identifier.
How do I create a product identifier?
The In-App Purchases form is used to generate In-App Purchase products. It contains a Product ID field that must be filled. Use this field to specify the product identifier for your product. Follow the steps below to create a product identifier:
Log in to iTunes Connect, then navigate to the Manage Your Applications module present in the home page.
iTunes Connect takes you to the Manage Your Apps page, which contains a list of all your applications. Select the application for which you want to create In-App Purchase products, then click on the Manage In-App Purchases button in the ensuing page for this application, then on the Create button in the next page.
Select a type for your In-App Purchase product. iTunes Connect takes you to the In-App Purchases form, which contains a Save button. Fill out the Product ID as well as all the other fields present in that form.
Figure 1 displays the
com.apples.mygreatapp.sport7days product identifiers for the
My Great App application.
How do I use a product identifier in my application?
You create an
SKProductsRequest object, then pass your list of product identifiers to its
initWithProductIdentifiers method to retrieve information about your products. See Listing 1 for an example that requests information about the products associated with the product identifiers shown in Figure 1.
Listing 1 Retrieve information about products
- (void) requestProductData
//Create a list of product identifiers
NSSet *productSet =[NSSet setWithObjects: @"com.apples.mygreatapp.consumable1",
//Create and initialize a products request object with the above list
SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers: productSet];
//Attach the request to your delegate
request.delegate = self;
//Send the request to the App Store
Document Revision History
Updated the "How do I create a product identifier?" section.
New document that describes how to create and use product identifiers for In-App Purchase.