I m having some trouble finding my sqlite file. When I run de app with iOS 5 simulator it runs ok but when I run it on iOS 5.1 it can t find the sqlite file. I m using this code to find the file.
- (NSString *) getDatabasePath {
NSString* databaseName = @"bohn_db.bin.sqlite";
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
return [documentsDir stringByAppendingPathComponent:databaseName];
}
在 iOS 5 和 iOS 5.1 上它没有, 我试图将文件从 de main bag 资源路径复制到文档路径( 以上路径), 它不工作导致文件在主 bunlde 资源路径中甚至找不到, 但文件在那里。 在 iOS 5.1 上会发生什么?
提前谢谢!