Will this be done on every launch of the app? Since it is in the applicationDidFinishLaunching method. Is there a way to do this once and for all?
Thanks!
Will this be done on every launch of the app? Since it is in the applicationDidFinishLaunching method. Is there a way to do this once and for all?
Thanks!
Hi you can take advantage of preferences..
here is the code to determine application is running for first time or not:(check this in applicationDidFinishLaunching method.)
NSUserDefaults *defaults =[NSUserDefaults standardUserDefaults];
if([defaults objectForKey:@"Remote_Notification_Registered"] == nil)
{
// This is first run ...
// Do your only one time initialization
[defaults setValue:@"1" forKey:@"Remote_Notification_Registered"];
}
else
{
// Not first run
}
Hope this will help.