If you are modifying your database at run time (i.e. you are inserting, deleting or updating records), you need to create a copy from bundle to documents directory. iOS sendboxing mechanism will not allow you to modify bundle resource at run time. So, you need to copy it to documents directory. Below code can help you out:
NSFileManager *fileManager = [NSFileManager defaultManager];
NSError *error = nil;
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];
NSString *filePath = [documentsDir stringByAppendingPathComponent:@"network.db"];
BOOL success = [fileManager fileExistsAtPath:filePath];
if(!success)
{
NSString *defaultDBPath = [[[NSBundle mainBundle] pathForResource:@"network" ofType:@"db"];
success = [fileManager copyItemAtPath:defaultDBPath toPath:filePath error:&error];
if (!success)
NSAssert1(0, @"Failed to create writable resource file with message '%@'.", [error localizedDescription]);
}
If you are referring your db for lookup purpose only (only using it for select queries), there is no need to copy from bundle to documents directory.