Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does an In App Purchase's Product ID have to begin with a Reverse-DNS?

Does an In App Purchase's Product ID have to begin with a Reverse-DNS like com.mycompany.My_Awesome_Game.Level_Pack_1 or can it just be standalone like Level_Pack_1?

like image 468
Alexsander Akers Avatar asked Aug 31 '10 02:08

Alexsander Akers


People also ask

What is product ID in In App Purchase iOS?

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.

What is bundle ID in Xcode?

When you create your Xcode project from a template, the bundle ID ( CFBundleIdentifier ), which uniquely identifies your app throughout the system, defaults to the organization ID appended to the app name that you enter in reverse-DNS format—for example, the bundle ID becomes com. example. mycompany. HelloWorld .

How do I distribute iOS apps without App Store?

Ad-Hoc Deployment Using the Apple Developer Program For private beta testing or temporary distribution, Apple allows developers to use the Ad-hoc app deployment method. In this scenario, the developer will deliver the app binary to each unique user via a download URL or email.


2 Answers

Product IDs can be whatever you want, although it is recomend you follow the reverse domain name style. But in the end there's no restriction over the naming of your product IDs. It also does not need to use your app bundle ID as a prefix.

From the source:

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.

So 'Level_Pack_1' —as in your example— would be a valid product id.

like image 169
Julio Gorgé Avatar answered Oct 07 '22 19:10

Julio Gorgé


This is an old question but I'm directed here since recently I've been wondering about the same question. Eventually as I walked through the implementation of IAP in my project this has become clear to me:

  1. if you don't need App Store to host content for your In-App Purchase the Product ID can be any combination of Alphanumeric (A-Za-z0-9), underscore (_) and dot (.);
  2. if you do need App Store to host content the Product ID must be reverse-DNS like (com.yourCompany.yourProduct) and must match the bundle identifier of your In-App Purchase Content project. Later when you archive the content project and upload it with Xcode archive uploader this is how App Store Connect knows how to associate the uploaded content with the in-app purchase product.
like image 31
CodeBrew Avatar answered Oct 07 '22 19:10

CodeBrew