1

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?

Daniel
  • 285
  • 3
  • 12
  • Not sure about why you want to do this, but I think it's worth asking yourself, is it really necessary? Is someone really going to go through the trouble of re-installing an app just to use this feature another five times? – Sandy Chapman Mar 03 '15 at 13:01
  • @SandyChapman I guess, if they really want to not pay for the iAP they'll find a way of not paying for it.. – Daniel Mar 03 '15 at 13:17

3 Answers3

1

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.

Shamas S
  • 7,507
  • 10
  • 46
  • 58
  • I understand how to implement the idea, however, stopping them from exploiting it is the issue. – Daniel Mar 03 '15 at 13:22
1

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.

ugur
  • 824
  • 1
  • 7
  • 15
  • I thought it would be the only option. However, when setting the server how would I uniquely identify the device? as if I did it as an (id) per install, surely re-downloading it would still put it in the same ballpark as userdefaults. – Daniel Mar 03 '15 at 13:19
1

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...

Community
  • 1
  • 1
Michal
  • 15,429
  • 10
  • 73
  • 104
  • 1
    thanks for your answer, yeah for the small percentage of users that would probably do this, it's not really worth going to the end of the earth for. – Daniel Mar 03 '15 at 13:20