what happens when an app that has in-app purchase products on it gets updated?

被刻印的时光 ゝ 提交于 2019-12-24 15:20:58

问题


I suppose it's up to the programmer to keep track of IAPs after the app is updated? Would I have to write a file to the documents folder saying the IAP was purchased, and then have the code check to see if the file's there once the app updates? I have an app out now that has in-app purchases available, and I'm planning on releasing an update, but what will happen to users that purchased IAPs?


回答1:


Apple keeps track of in-app-purchases that your users make. You can ask Apple about the in-app-purchases for the current user in ApplicationDidFinishLaunching.

You can keep track of in-app-purchase status in NSUserDefaults or perhaps the keychain. This way you don't need to constantly query Apple. Keep in mind if the app is deleted from the device the NSUserDefaults will be wiped out (so the app should always ask Apple in ApplicationDidFinishLaunching.

Apple's docs are a good read.



来源:https://stackoverflow.com/questions/8498679/what-happens-when-an-app-that-has-in-app-purchase-products-on-it-gets-updated

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!