Reputation: 4974
(from SQLiteDB.h)
#import <sqlite3.h>
@interface SQLiteDB : NSObject {
NSString *dbPath;
int databaseKey;
sqlite3 *db;
}
//@property (nonatomic, copy) NSString *db;
@property (nonatomic, copy) NSString *dbPath;
@property (nonatomic) sqlite3 *db;
@property (nonatomic) int databaseKey;
@end
=============== (from SQLiteDB.m)
#import "SQLiteDB.h"
@implementation SQLiteDB
@synthesize db, dbPath, databaseKey;
@end
=============== (from SampleAppDelegate.m)
#import "ReaderSampleAppDelegate.h"
#import "ReaderSampleViewController.h"
@implementation ReaderSampleAppDelegate
@synthesize window;
@synthesize viewController;
#pragma mark -
#pragma mark Application lifecycle
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// create the d/b or get the connection value
SQLiteDB *dbInstance = [[SQLiteDB alloc] init]; // Error here <---------
}
==================
Error is: SQLiteDB undeclared.
I thought I did declare it in SQLiteDB.h? How do I fix this?
Upvotes: 0
Views: 117
Reputation: 181270
In SampleAppDelegate.m
include the following line:
#import "SQLiteDB.h"
Upvotes: 0