简体   繁体   中英

ios - how to prevent app from reinstalling

I make an iOS Swift app which offers some trial opportunities (eg 5 tries of doing something) for users to get acquainted with app capabilities. After user has run out of trial attempts, he has to buy the next ones. How can I remember the fact that the app had been installed earlier by now on the same device/with same Apple ID ?

I know that UserDefaults are deleted after uninstalling, and the KeyChain data may be deleted deliberately as well.

The user has no need to register for the service he or she uses, so I don't have their credentials. UUID isn't allowed to use as I know, and identifierforvendor changes after deleting as well.

Which alternatives are possible for this case? Thanks in advance.

You can go with KeyChain , KeyChain will not removed after removing the application.(ie uninstalling application)

You can store your counts in Keychain and when the next time user install application you can get that user has used some trials.

Also

Note: On iPhone, Keychain rights depend on the provisioning profile used to sign your application. Be sure to consistently use the same provisioning profile across different versions of your application.

Referenced from - here

I would recommend In App Purchases . Then you don't have to worry about checks for deletion and reinstalling. Just offer IAP in your app, offer 5 'credits' or what have you so they can try the specific functionality that you're offering, then block the functionality when they've run out of credits. Allowing them to purchase more.

This will check against a specific Apple ID, but not a specific device. However, you should let your users have the same capabilities on all their devices. People aren't walking around with 10 iPhones AND using your app on all of them anyway.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM