У меня есть этот код:
#import "SQLiteDB.h"
@implementation SQLiteDB
@synthesize db, dbPath, databaseKey;
@end
//-------------- check for database or create it ----------------|
- (void)checkForDatabase {
NSFileManager *filemanager = [NSFileManager defaultManager];
NSString *databasePath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]
stringByAppendingString:@"/ppcipher.s3db"];
if(![filemanager fileExistsAtPath:databasePath]) { //Database doesn't exist yet, so we create it...
NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/ppcipher.s3db"];
sqlite3 *db;
if(sqlite3_open(databasePath, db) == SQLITE_OK) {
}
}
}
Жалуется, что «определение метода не в контексте @implementation». Так, куда это идет? (Я пытался в .h файле, но все равно получаю ошибку)