• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining if it is the first time the application has launched?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Determining if it is the first time the application has launched? (From: Austin Sarner <email@hidden>)

  • Prev by Date: [newbie] echo string
  • Next by Date: Re: Determining if it is the first time the application has launched?
  • Previous by thread: Re: Determining if it is the first time the application has launched?
  • Next by thread: Re: Determining if it is the first time the application has launched?
  • Index(es):
    • Date
    • Thread