Re: Determining if it is the first time the application has launched?
Re: Determining if it is the first time the application has launched?
- Subject: Re: Determining if it is the first time the application has launched?
- From: James Andrews <email@hidden>
- Date: Mon, 17 Jan 2005 16:09:49 -0500
in your controller create an awakeFromNib method.
#define preferences [NSUserDefaults standardUserDefaults]
hasPreviousRun=false; // this is a bool that needs defining somewhere.
if([preferences boolForKey:@"hasPreviouslyRun"]==false){
// Allow
hasPreviouslyRun=true;
// sets it in the NSUserDefaults
[preferences setObject:@"yes" forKey:@"hasPreviouslyRun"];
}
now you have a bool you can access in your program.
-james
On Jan 17, 2005, at 3:47 PM, Austin Sarner wrote:
Is there any relatively simple way to determine if it is the first time the user is using your program?
Thanks. (I realize this could be done by checking if your plist exists, but maybe it is simpler)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden