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: email@hidden
- Date: Mon, 17 Jan 2005 13:09:03 -0800
On Jan 17, 2005, at 12: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)
[[NSUserDefaults standardUserDefaults] registerDefaults: [@"{FirstTime
= YES;} propertyList]]; //this is bogus shorthand, read 'em from your
info.plist or something.
if ([[NSUserDefaults standardUserDefaults] boolForKey: @"FirstTime"]) {
// first time
[[NSUserDefaults standardUserDefaults] setBool: NO forKey:
@"FirstTime"];
} else {
// not the first time
}
_______________________________________________
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