On Oct 26, 2008, at 4:23 PM, Adam Penny wrote:
So from that, do I gather that the binary is the preferred standard for plists?That's the binary plist representation. This will be transparent to well-behaved applications. Naughty ones will try to read the raw XML plist representation and fail, but ones that use the plist serialization API won't know the difference.
Presently it appears to be, but Apple has changed that in the past, so don't rely on it...
I'll probably show myself up to be barmy with my next revelation, but this preference panel actually started off to set the preferences for an automatically triggered Ruby command line script that I wrote for waking up hosts that share printers automatically when a print job is sent to the printer in question. I built that to read its preferences from an apple XML type plist file. At a future date, I'd like to rewrite that as an objective-c command line utility, but for the moment Is there any way I can coerce CFPreferences to synchronize as XML rather than binary? As the script will be the only thing referring to the plist for the moment I'm not too worried about other 'naughty' applications! :-)
A couple of suggestions that you may not have considered:1) if you use /usr/bin/defaults in your Ruby script, you can read/ write the preference file and ignore the plist format. 2) avoid the preference system entirely by writing your plist somewhere else, such as the Library/Application Support hierarchy. You can then read/write the plist using NSPropertyListSerialization, which allows you to specify XML format.
hth, Adam
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]