Reputation: 285
Problem
When A user downloads my application, they'll have the ability to use a certain feature. Say, 5 times. After them times are up, they'll require the iAP to continue using it. However, I have a few problems.
I want to make it simple, and just store it in the userDefaults, or keychain. However, if they re-download the app will they then have access to the feature another 5 times?
And I don't want to have to include external information from a data-base with user logins etc.
Solution
Being able to check if this particular phone has used the application before, if not. They have 5 goes stored in their defaults. However, if they haven't where to go from there?
Upvotes: 1
Views: 62
Reputation: 15669
Technology-wise - if they delete the app, I believe you'll lose your NSUserDefaults
as you can see here. What about using iCloud? Is that too much? You could store that trial is up. But yes, internet connection would be necessary for that operation.
If your app is really good and users will want to use it then they won't think about deleting and re-downloading. If they won't see value in the iAP, they'll try to "hack" it. That's a philosophical answer...
Upvotes: 1
Reputation: 842
1- At anytime the user may restore his device and reconstruct the keychain and use 5 times more.
2- You can set a server for user management.
I guess first option is acceptable and easier than second. Not much people resets his device's data just 5 more rights in some game.
Upvotes: 1
Reputation: 7549
Check NSUserDefualts if you have saved their usage counter. If you haven't, save it as 1, otherwise increment it.
If you've saved it before, and the increment is at 5, tell them that free trial is up.
Upvotes: 1