I have IAP question. Basically, my app needs calculate how many times a user is using a function, and I would like to charge accordingly. I probably going to charge 1 cent or so per usage of the function, so if IAP is $1 minimum, that's credit for 100 usages.
Now my question is that what type of IAP I should choose: consumable, non-consumable, subscription.
Second part of the question is: If the user pays $1 for the IAP, s/he could use the function 100 times. How should I track the usage time and where to temporarily store the usage value? I know I could write/read in/out of a file in the sandbox, would that be secure? The user may use 10 times and quit and come back to continue. I need give the user credit for another 90 usages.
Do I have to go the way that you buy IAP once and enjoy all time. By that way, I have to set IAP price higher and attract much fewer purchases.
Any idea? Thanks!
the code I have seems to have problem. user can re-install and get full initial credits again.
initialCredit = 500;
defaults = [NSUserDefaults standardUserDefaults];
if (![defaults objectForKey:theAppCrediteKey]) {
[defaults setObject:[NSNumber numberWithFloat:initialCredit] forKey:theAppCrediteKey];
}
readingCredits = [defaults objectForKey:theAppCrediteKey];
if ([readingCredits floatValue] < 0) {
readingCredits = [NSNumber numberWithFloat:0];
}