Вы можете добавить файл базы данных в свой проект, просто перетащив его в папку «Ресурсы» в навигаторе проекта. Убедитесь, что вы добавили его к нужным целям, когда вам будет предложено.
Используйте этот код для загрузки файла sqlite
-(void) getdatabasePath
{
NSString *databaseName = [NSString stringWithFormat:@"%@", @"Database.sqlite"];
//Get the path to the Document and append the databaseName
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documetsDir = [documentPaths objectAtIndex:0];
databasePath = [[documetsDir stringByAppendingPathComponent:databaseName] retain];
// Check if the SQL database has already been saved to the users phone, if not then copy it over
BOOL success;
NSFileManager *fileManager = [NSFileManager defaultManager];
success = [fileManager fileExistsAtPath:databasePath];
if(success) return;
// If not then proceed to copy the database from the application to the users filesystem
NSString *databasePathFromApp = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:databaseName];
[fileManager copyItemAtPath:databasePathFromApp toPath:databasePath error:nil];
}