I following old tutorial that use MRC, and when i pasted code i got an error: Implicit conversion to an Objective-C pointer using SQLite3 on a line:
if (sqlite3_open([sqLiteDb UTF8String], &_database) != SQLITE_OK) {
Full code snippet is :
static FailedBankDatabase *_database;
+ (FailedBankDatabase*)database {
if (_database == nil) {
_database = [[FailedBankDatabase alloc] init];
}
return _database;
}
- (id)init {
if ((self = [super init])) {
NSString *sqLiteDb = [[NSBundle mainBundle] pathForResource:@"banklist"
ofType:@"sqlite3"];
if (sqlite3_open([sqLiteDb UTF8String], &_database) != SQLITE_OK) {
NSLog(@"Failed to open database!");
}
}
return self;
}
Im not very keen in MRC, can you help me fix it?
CoreDataorFMDB.