Read/Write to info.plist's LSEnvironment
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