Can I migrate purchase between applications in macOS App Store?

前提是你 提交于 2019-12-13 17:44:20

问题


I have several similar applications (A1-A3) with hugely the same codebase. They all do similar things (diagrams), each with a specialisation for a specific use case. I am now considering to create one app (B) that sells the specialisations as an Mac App Store In App Purchase. So basically, I reduce number of applications, but will provide same diagrams, just change how to sell them from dedicated app to in-app.

How can I best ensure that buyers of the "old" applications A1-A3 can use the specialisations they bought in the new software B? I don’t want to charge them twice. So, they should be able to “restore” the specialisation that they bought as a A2 in B. Is that possible? If so, how?


回答1:


Within app B do following steps in the background or on click of the restore IAP-button:

  • Look for the "old" app A1-A3 using NSBundle bundleWithIdentifier
  • get the receipt of this bundle using appStoreReceiptURL
  • validate the receipt
  • unlock functionality

Bare in mind that the terms and conditions of Apple say something along the line of "only appstore IAP should be used to unlock features; don't roll your own license mechanism"



来源:https://stackoverflow.com/questions/50480313/can-i-migrate-purchase-between-applications-in-macos-app-store

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