Re: Preferences file in Tiger
Re: Preferences file in Tiger
- Subject: Re: Preferences file in Tiger
- From: Chris Parker <email@hidden>
- Date: Sun, 1 May 2005 22:45:50 -0700
On May 1, 2005, at 1:50 AM, Pradeep Kumar wrote:
The preferences file (files in ~/Library/Preferences) are in a very
cryptic format when opened in
TextEdit. In Panther and below, the file was a normal xml file. But
now this file can be read
only in Property List Editor. What has actually happeneded?
The preferences plists in Tiger now use the binary plist format when
written out to disk. The important thing to note is that it's still a
plist. The plist APIs (both CFPropertyList.h and the
NSPropertyListSerialization methods) understand the binary plist format.
Binary preferences property lists should be readable back to Mac OS X
10.2 (Jaguar).
I have this code that removes an item from the dock and quits it so
that the changes are
immediately reflected. This worked fine till Panther. But in Tiger
it stopped working. However
running it multiple times will eventually remove the item from the
Dock. I have tried various
calls like CFPreferencesAppSynchronize etc, but no avail. Has
anyone faced this problem yet.
What's the solution for this?
If you're groping the preferences plists assuming they were XML, you
should be shifting over to using the preferences APIs directly.
Exactly what has changed in the preferences file? Is it safe to
read the com.apple.dock.plist file
and then make modifications and write it back?
It's never been amazingly safe to do that as you're editing the plist
file behind the Dock's back, which may sync out other changes,
overwriting the ones you've made on disk. Also, while the preferences
APIs are documented, the Dock's keys in its plists have not.
.chris
--
Chris Parker
Cocoa Frameworks
Apple Computer, Inc.
_______________________________________________
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