couchbaselabs/TouchDB-iOS — Issue #30: API to install a database from a file
Author: snej
Created: 2012-01-23 18:29:16+00:00
State: open
Labels: compatibility, feature

Some apps want to install a pre-populated database on first run. Other apps might want to download a database through some other means than replication. There should be a method that lets them do this without having to know too much about where databases and their attachment stores live. Something like

-[TDDatabase installFromFile: (NSString*)dbFile withAttachmentDir: (NSString*)attachmentDir;

(Couchbase Mobile 2.0 has a method for this.)

Until this is available, here's a mailing list post that explains how to do it with the current API:
https://groups.google.com/d/msg/mobile-couchbase/LNszkY15jko/pb3Q3B6VKhQJ