CSV reading and writing library written in Swift. https://github.com/yaslab/CSV.swift
import CSV
let csvString = "id,name\n1,foo"
let csv = try! CSVReader(string: csvString,
hasHeaderRow: true) // It must be true.
while csv.next() != nil {
print("\(csv["id"]!)") // => "1"
print("\(csv["name"]!)") // => "foo"
}