问题
TL;DR: Is there a way to verify that a user has purchased another app (of mine) from the Mac App Store?
In a brief, I want to completely rebrand one of my applications on the Mac App Store. The current version is very buggy and has a user base of nearly 90% pirates. I want to shut down the old application and completely rebrand it as a new product.
However, I don't want to completely screw over my current, legitimate customer base. I am hoping there is a solution to this. The way I was hoping to go about this was to:
- Create a new application – completely rebranded
- Make it free
- Have an In-App Purchase that unlocks the Pro version
- Allow customers of my previous app to "restore their purchase" to unlock the Pro version
The new app will have extensive anti-piracy measures. Furthermore, the current application requires a connection to one of my servers. When I release the rebranded app, I will shut down the current app.
I realize the forcing users to migrate may cause some backlash; however, I am hoping that, by providing the new and improved version 100% free, the backlash will pass.
回答1:
- Look for the old app 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/51458289/verifying-the-purchase-receipt-of-another-application-mac-app-store