• 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: how do I determine if this is the first time the app is launched?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how do I determine if this is the first time the app is launched?


  • Subject: Re: how do I determine if this is the first time the app is launched?
  • From: Ashley Clark <email@hidden>
  • Date: Sat, 24 Jun 2006 18:14:23 -0500

On Jun 24, 2006, at 5:53 PM, Alan Smith wrote:

I tried checking if the preference file existed but apparently but by
the time it awakeFromNib it is there. I need to add some things to the
defaults so that the rest of my app can use them. I also don't want to
overwrite them every time is launches, that would defeat the purpose.

Why not just check if the defaults you need are there? That also has the benefit that if someone edits their plist file and deletes one of your needed defaults you can restore it to a sane value.


If you're using objectForKey: in NSUserDefaults to read from your preference file then you'll get a nil value if it's not already set.

NSUserDefaults documentation

Ashley Clark

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >how do I determine if this is the first time the app is launched? (From: "Alan Smith" <email@hidden>)

  • Prev by Date: how do I determine if this is the first time the app is launched?
  • Next by Date: Re: closing window and having application remain running
  • Previous by thread: how do I determine if this is the first time the app is launched?
  • Next by thread: Re: how do I determine if this is the first time the app is launched?
  • Index(es):
    • Date
    • Thread