나는이 내 코드에서 다음 문 :sqlite3_open - 열 수 없습니다 데이터베이스
NSString *docsDir;
NSArray *dirPaths;
dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory, NSUserDomainMask, YES);
docsDir = [dirPaths objectAtIndex:0];
databasePath = [[NSString alloc] initWithString:[docsDir stringByAppendingPathComponent:@"Notebook.sqlite"]];
NSFileManager *fileMgr = [NSFileManager defaultManager];
const char *dbpath = [databasePath UTF8String];
NSLog(@"open sqlite at %s",dbpath);
if (sqlite3_open(dbpath, ¬eDB)==SQLITE_OK)
NSLog
의 출력이
/사용자 /입니다 GinLin/라이브러리/응용 프로그램 지원/아이폰 시뮬레이터/7.0/응용 프로그램/CE1BAB1C-3DEC-4A1D-A083-537B0B51C99D/도서관/설명서/
Notebook.sqlite하지만 내 데이터베이스를 여는 될 것 같지 않습니다. 그리고 "/ CE1BAB1C-3DEC-4A1D-A083-537B0B51C99D/Library /"에서 "Documentation"폴더를 찾을 수 없습니다.
아무도 도와 줄 수 있습니까?
예를 복사! 그것은 작동합니다! 대단히 감사합니다. – Zheng