The fmdb docs say that if you pass a file system path to databaseWithPath: it will create a file for you:
I am getting my file system path with this code:
[[NSHomeDirectory() stringByAppendingPathComponent:@"Desktop"] stringByAppendingPathComponent:@"file.db"];
And attempting to setup my db like so:
FMDatabase *aDB = nil;
if (aLanguageDBPath) {
aDB = [FMDatabase databaseWithPath:aLanguageDBPath];
}
The result is a valid FMDatabase object that isn't being written to disk as advertised. Did I misinterpret the explanation in the docs? How am I supposed to create and write dbs to disk on the fly?
Thanks!
Just found out that the db isn't actually made on disk until [db open];
is called.