Reputation: 61
I am doing one application. In that I am using auto renewal subscription. When I install my application, I will do the subscribe operation. And whenever I reinstall the same application in same device, I have to use the restore operation. So how to find application is install or reinstall.
Upvotes: 0
Views: 245
Reputation: 2131
If any application will write to keychain it's flags to make programmer's life easier, it will become a trash. Keychain main mission - is to store secure data.
As for subscribtions - use methods, provided by framework to find out whether app has something to restore.For example MKStore Kit
More useful links:
Upvotes: 1
Reputation: 570
you can store the flag value in keychain according to app is installed or not.
use this link for storing value in keychain
http://dev-metal.blogspot.in/2010/08/howto-use-keychain-in-iphone-sdk-to.html
Also for checking application on device that is install or not use this:
Detecting programmatically whether an app is installed on iPhone
use this code for saving value
- (void) savePassword: (NSString*) password {
[self.keychainItemWrapper setObject:password forKey:
(id)kSecValueData];
}
for retrieve value:
- (void) retrievePassword {
return (NSString*) [self.keychainItemWrapper objectForKey:
(id)kSecValueData];
}
Upvotes: 2