Last active
August 29, 2015 14:14
-
-
Save leohacker/07b7cb0e546401bafbca to your computer and use it in GitHub Desktop.
Find the path for resource, open the sqlite3 database.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment