Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Read, write and manipulate both binary and XML property lists as defined by apple

begin to implement uid object type (not yet finished)

Apple has a special object type uid. This basically is an integer with a
special object type code. In XML this is represented via
<dict><key>CF$UID</key><integer>...</integer></dict> (yes, via a
dictionary with just one only value - WTF?).

To match XML behavior I currently create a dictionary like described
above in binary format as well. But I'm not sure if this is the way we
should go…
latest commit 27b35276ef
Christian Kruse authored April 21, 2014
Octocat-spinner-32 lib begin to implement uid object type (not yet finished) April 21, 2014
Octocat-spinner-32 test Update tests for new lib structure February 08, 2014
Octocat-spinner-32 LICENSE added README and LICENSE files February 28, 2010
Octocat-spinner-32 README updated readme information with installation instructions November 30, 2010
Octocat-spinner-32 Rakefile version push February 12, 2014
Octocat-spinner-32 THANKS fixed typo September 22, 2010
README
CFPropertyList implementation
class to read, manipulate and write both XML and binary property list
files (plist(5)) as defined by Apple. Have a look at CFPropertyList::List
for more documentation.

== Installation

You could either use ruby gems and install it via

  gem install CFPropertyList

or you could clone this repository and place it somewhere in your load path.

== Example
  require 'cfpropertylist'

  # create a arbitrary data structure of basic data types
  data = {
    'name' => 'John Doe',
    'missing' => true,
    'last_seen' => Time.now,
    'friends' => ['Jane Doe','Julian Doe'],
    'likes' => {
      'me' => false
    }
  }

  # create CFPropertyList::List object
  plist = CFPropertyList::List.new

  # call CFPropertyList.guess() to create corresponding CFType values
  plist.value = CFPropertyList.guess(data)

  # write plist to file
  plist.save("example.plist", CFPropertyList::List::FORMAT_BINARY)

  # … later, read it again
  plist = CFPropertyList::List.new(:file => "example.plist")
  data = CFPropertyList.native_types(plist.value)

Author::    Christian Kruse (mailto:cjk@wwwtech.de)
Copyright:: Copyright (c) 2010
License::   MIT License

Something went wrong with that request. Please try again.