Converts CSV files to PLIST files
Switch branches/tags
Nothing to show
Failed to load latest commit information.
bin Get basic command parsing working Mar 20, 2011
Gemfile Get basic command parsing working Mar 20, 2011
LICENSE Add examples Mar 24, 2011
Rakefile Get basic command parsing working Mar 20, 2011
csv2plist.gemspec Remove dependency on fastercsv - use ruby 1.9 CSV class Jul 5, 2012



Property list files are a great way to store data within your iOS or OS/X application - they're well-structured and super-easy to parse. CSV (comma- separated variable) files are a great to export data from a spreadsheet which is much easier to edit than the raw PLIST files.

csv2plist is a utility program that converts files from CSV format into property lists. The root level of the property list will be an array and each element of the array will be a dictionary, corresponding to the equivalent row in the spreadsheet. The keys of the dictionary are the column names and the values are the column values.


csv2plist is a ruby gem. Install it with the following command

$ sudo gem install csv2plist

If your terminal environment is set up sanely, you should be able to run it by simply invoking it at a shell prompt:

$ csv2plist -h
csv2plist converts a .....


If your CSV file contains a header row, and only contains string values, then you can simply do this:

$ csv2plist sample.csv

This will create a property list file called sample.plist.

See csv2plist -h for other options.


Basic Strings

If test.csv contains the following:


Converting it with csv2plist test.csv will produce a file containing:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">