views:

55

answers:

2

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?

+2  A: 

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.

Julio Gorgé
Not a good practice to recommend. There's not enough namespace in the App store database otherwise.
hotpaw2
A: 

If you don't use reverse domain style (com.yourcompanyname.yourappname) then your ID could collide with another company who used or wants to use that product identifier. Who knows if this will get you in trouble with Apple, or get the attention of some unfriendly trademark attorney. If you use your company's (or personal) website's registered domain name, and so does everybody else use theirs, then it's guaranteed that there will be no collisions, and no trouble with other developers.

hotpaw2