In my application i am using In - App purchases to provide a subscription of 1 year….now i need to save the time and date when the user buys the subscription an
You can simply store it in NSUserDefaults
:
[[NSUserDefaults standardUserDefaults] setObject:[NSDate now] forKey:@"purchaseDate"];
Then retrieve it like such:
NSDate *purchaseDate = [[NSUserDefaults standardUserDefaults] objectForKey:@"purchaseDate"];
And when you're done with it:
[[NSUserDefaults standardUserDefaults] removeObjectForKey:@"purchaseDate"];