Game Development Reference
In-Depth Information
products from a web service. If you are just getting started with in-app purchases, a fixed list might
work for you, but you will have to update your app to change the list.
Once we have our list of possible Product IDs, we make a request to the iTunes Store, asking which
of the IDs we have passed along are valid and ready for sale. The IDs returned from the iTunes Store
represent the items we want to make available to the user. The iTunes Store will not return Product
IDs that are unknown or not ready for sale. This ensures that we are presenting only valid items
that have gone through Apple's review process. In addition to letting us know that the IDs are valid,
the iTunes Store returns the localized strings associated with the purchase, allowing us to present
language-appropriate text to the user that matches exactly what was entered into iTunes Connect.
Continuing with the workflow shown in Figure 10-6 , at some point the user will click a button to
purchase an item. When this happens, we simply create a payment request and submit it, at which
NSUserDefaults , or we can do something more sophisticated, like save it to a web service.
10-7 .
Figure 10-7. Making a purchase
 
Search WWH ::




Custom Search