Skip to content

SwiftArtery/Realm-CSV-Exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Realm CSV Exporter

RealmSwift CSV Exporter

Installation

Add the following to your Podfile

pod 'RealmSwift'
pod 'PathKit'

Add CSVDataExporter.swift and DataExporter.swift to your Xcode project.

Exporting a Realm file to CSV - Example

Exports file to device's documents directory.

// Absolute path to documents directory and, in this case, the output directory
let path = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true).first!
// Absolute path to Realm file
let pathString = path + "/default.realm"
            
let csvDataExporter = try! CSVDataExporter(realmFilePath: pathString)
try! csvDataExporter.export(toFolderAtPath: path)

About

RealmSwift CSV Exporter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages