• 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: 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

  • Follow-Ups:
    • Re: Determining if it is the first time the application has launched?
      • From: "M. Uli Kusterer" <email@hidden>
    • Re: Determining if it is the first time the application has launched?
      • From: daniel <email@hidden>
References: 
 >Determining if it is the first time the application has launched? (From: Austin Sarner <email@hidden>)

  • Prev by Date: Re: Determining if it is the first time the application has launched?
  • Next by Date: Re: [newbie] echo string
  • 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