SpokaneDude
SpokaneDude

Reputation: 4984

Method definition not found

What am I doing wrong? This is the .h file:

#import <UIKit/UIKit.h>
#import <sqlite3.h>

@class ReaderViewController;

@interface ReaderAppDelegate : NSObject <UIApplicationDelegate> { 
    UIWindow *window; 
    ReaderViewController *viewController; 
} 

@property (nonatomic, retain) IBOutlet UIWindow *window; 
@property (nonatomic, retain) IBOutlet ReaderViewController *viewController; 

- (void)checkForDatabase; 
//- (void)SQLiteConnection: (NSString *)defaultDBPath; 
@end 

The error is shown here:

screen shot of compile results

Upvotes: 1

Views: 4806

Answers (2)

Rob Napier
Rob Napier

Reputation: 299605

You have failed to implement checkForDatabase in ReaderAppDelegate.m (or in any other file you're linking into the project). You said you would in the header, and then you didn't.

Upvotes: 1

theChrisKent
theChrisKent

Reputation: 15099

You are calling the [self checkForDatabase] method which doesn't appear to exist in the .m file.


The Incomplete Implementation warning is because you have declared the checkForDatabase method in your interface

The Method Definition error is because you are attempting to call the missing method in the application:didFinishLaunchingWithOptions: method.

Upvotes: 1

Related Questions