An In-App purchase within a game provides users with the ability to purchase upgrades, access levels, weapons, or other content by transacting with the App Store. The App Store will then communicate with the game to notify it that a purchase has been authorized and that the content should be unlocked within the game. All of this takes place within the iOS SDK and the App Store commerce systems, so you will not have to deal with credit card transactions or the security of commercial transactions across the wire. Apple will handle the entire process and you will receive money in your account the same way you would with regular application purchases.
Internally, In-App purchases are accomplished using the iOS SDK Store Kit API. This API is responsible for communicating with the App Store and collecting payments from the user:
To date, Unity does not provide a channel within the iOS version of the Unity product for an application to add In-App purchases to games so, as with iAds, we will have to rely on a third-party plugin to implement this functionality. As before we will use a plugin from Prime31 – the StoreKit plugin.
There are four different types of In-App purchases: non-consumable, consumable, subscriptions, and auto-renewing subscriptions:
In-App purchases can use one of two delivery models with iTunes, the built-in model and the server model.
In the built-in product model, everything required for your application to deliver In-App purchases to your customer is built in to your game. This means that all of the consumable and non-consumable In-App purchases are already built into the game. Accordingly, this means that all purchase access would be defined through application identifiers. As an individual application would be responsible for maintaining these preferences they can become lost when a user moves between devices, so you must ensure that any preferences, that would preserve that state are stored in application preferences, as they are backed up by iTunes. Another solution is to use iCloud, or similar, to host these application preferences off of the device:
In the server product model a separate server maintains the In-App purchase content as well as the transactions with the App Store. The App Store, application and the server then orchestrate confirming purchases and delivering content to the iOS device. In this model a game would deliver new levels or other content directly to the application. While this model is compelling, at the moment it does not work well with Unity iOS applications, as Apple requires that all of your content be distributed in the application on the App Store. It is included here for completeness:
As the In-App purchase process does not provide the capability to patch an application, and since Unity will not directly load content that is not in the application bundle, it is expected that all of the content that you plan to deliver through In-App purchases will be delivered in a version of your application in the App Store.
3.135.194.251