FROM : Jean-Daniel Dupas
DATE : Tue Jun 03 21:47:43 2008
Le 3 juin 08 à 21:24, David Hoerl a écrit :
> I'm using [NSDictionary writeToFile:...] to save a fairly large
> dictionary as a text plist file. I found a quick and dirty hack to
> convert it into a binary formatted file:
>
> strcpy(command, "/usr/bin/plutil -convert binary1 ");
> strcat(command, fileName);
> ret = system(command);
>
> Yeah, I know - a real groaner - but I was in a hurry.
>
> Am I missing something obvious? Is there code out there that can
> take a dictionary and save it as a binary plist?
>
> Thanks,
>
> David
>
See the NSPropertyListSerialization class.
DATE : Tue Jun 03 21:47:43 2008
Le 3 juin 08 à 21:24, David Hoerl a écrit :
> I'm using [NSDictionary writeToFile:...] to save a fairly large
> dictionary as a text plist file. I found a quick and dirty hack to
> convert it into a binary formatted file:
>
> strcpy(command, "/usr/bin/plutil -convert binary1 ");
> strcat(command, fileName);
> ret = system(command);
>
> Yeah, I know - a real groaner - but I was in a hurry.
>
> Am I missing something obvious? Is there code out there that can
> take a dictionary and save it as a binary plist?
>
> Thanks,
>
> David
>
See the NSPropertyListSerialization class.
| Related mails | Author | Date |
|---|---|---|
| David Hoerl | Jun 3, 21:24 | |
| Jens Alfke | Jun 3, 21:46 | |
| Jean-Daniel Dupas | Jun 3, 21:47 | |
| mmalc crawford | Jun 3, 21:59 |






Cocoa mail archive

