0
votes

I am having an issue where my app will fail right as I start running it from xcode. I am trying to build a Mac OS X App that has a WebView.

I connect webview to webview via the AppDelegate file. Why would it keep crashing when I try testing my app?

This is the error I get: "Thread 1: Program Received SignalL "SIGABRT""

This is the I have:

@interface WebViewExampleAppDelegate : NSObject  {
    NSWindow *window;
    IBOutlet WebView *webView;
}

@property (assign) IBOutlet NSWindow *window;
@property (nonatomic, retain) IBOutlet WebView *webView;

@end

@implementation WebViewExampleAppDelegate

@synthesize window;
@synthesize webView;

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
}

- (void)awakeFromNib {
    NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
    NSString *htmlPath = [resourcesPath stringByAppendingString:@"/htdocs/index.html"];
    [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]];
}
1
What line does it give you this error on?user1118321

1 Answers

0
votes

You may not have added the WebKit framework to your project. To do that, go to the top (project) section of the left hand window (in Project navigator tab) and the Summary tab of the center section. Where it says "linked Frameworks and Libraries, click on the '+' at the bottom. Search for WebKit.framework and add that.