I have a Mac OS X application with IAP. The IAP items are consumable and large quantities of them may be used in a very short time, not at once, but in small pieces. So, basically it is not practical for me to save the consumption of these items on my server, because if I do so, my app needs to communicate with the server almost constantly, just to update the consumption of the item in small bits.
I have managed to store this consumable item data on a file locally located in user's app container folder. I also have used some kind of encryption, so that user can't easily add quantities to the item.
My question is: Is this method reliable? My biggest concern is that user make a purchase, and then somehow the data that I have saved locally be destroyed; this lost item can never be retrieved. Does the data in the app's container folder get lost when user uninstalls or updates my app?
On the other hand, I can not save purchases on my server and restore them if user lost the file, because I can never know which quantities of the item have been used by the user since its purchase.