Reputation: 1443
I understand that, for In-App Purchases, I make a request to the store, and then the app loads the UI, and the user taps "buy" and makes their purchase, and then the app delivers it.
This is a question about that first step: making the request.
For my game, I'm making an IAP to remove advertisements for $1.00.
My confusion lies in the product identifier. I can't use my Bundle ID in this scenario, because it contains hyphens. What do I put? Reverse domain? Any alphanumeric identifier?
I tried using something like noads
in both iTunes Connect and my code, but this returns invalid.
Would I use com.example.noads
?
Some other information related to my predicament:
Upvotes: 0
Views: 528
Reputation: 453
Make sure that your sales contracts are in effect. It kept returning the identifiers as invalid until I set that up.
Upvotes: 1
Reputation: 119
So you mean you actually receive a SKProductsResponse with the invalidProductIdentifiers field containing the ID you've sent with the request?
If so, I would double check that you're really using the same string that you set in ITunes Connect.
If that checks out, the problem may lie with your test user. You may only log in via the dialog that iOS launches from your app, don't sign in with the test user outside the app, like in the app store app! If you have done so, your test user becomes useless, and you need to create a new test user.
Upvotes: 0
Reputation: 16268
In the product identifier you put a unique string across the whole Apple system. The idea is to put an identifier string rather than just an id like 1
or 53e31xp
.
In my particular case, I use reverse domain combined with a subset that describes the product, something like: com.mydomain.myapp.mycategories.myproduct
Edit: Note that after you have created an IAP you may have to wait a couple of hours for it to return as a valid product when making the request
Upvotes: 0