• 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
Read/Write to info.plist's LSEnvironment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Read/Write to info.plist's LSEnvironment


  • Subject: Read/Write to info.plist's LSEnvironment
  • From: "Lee, Frederick" <email@hidden>
  • Date: Mon, 21 Jul 2008 12:50:18 -0400
  • Thread-topic: Read/Write to info.plist's LSEnvironment

Simple need: to store NSString values (UserName, PW) in a Dictionary
format within my application's .plist.

I've read Apple's Cocoa literature and found that .plist's LSEnvironment
is the way to go.





Using the .plist editor to add LSEnvironment dictionary and member keys
is straight forward.



But I'm having trouble figuring out how to programmatically
update/retrieve these values.



>From what I've read, I need to use Core Foundation utilities (prefer
NS).



So, I guess I need to:

1)       create a CF path to the .plist within my application bundle.

2)      Then I need to access this .plist: CFPreferenceCopyAppValue().

3)      Then I do a CFPreferencesSetValue?



My .plist has the following:

LSEnvironment = {

   RequesterID = " ";

  Password = " ";

};

...

I just want to set/get these two members of LSEnvironment.



Regards,

Ric.



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Read/Write to info.plist's LSEnvironment
      • From: "Finlay Dobbie" <email@hidden>
  • Prev by Date: Re: Newbie CALayer Questions
  • Next by Date: Re: Design question, which controller class to use
  • Previous by thread: Re: NSURLConnection - bypass Keychain dialog?
  • Next by thread: Re: Read/Write to info.plist's LSEnvironment
  • Index(es):
    • Date
    • Thread