Вам просто нужно добавить импорт заголовков WebKit в ваш файл заголовка:
#import <WebKit/WebKit.h>
Ваш код также можно упростить, не определяя переменную экземпляра для объявленных вами свойств:
Заголовочный файл (.h):
#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
@interface AttendanceWizardAppDelegate : NSObject <NSApplicationDelegate>
// No need for a iVar declaration
@property (weak) IBOutlet WebView *webView;
@property (assign) IBOutlet NSWindow *window;
@end
Файл реализации (.m):
#import "AttendanceWizardAppDelegate.h"
@implementation AttendanceWizardAppDelegate
// Simplified synthesize declarations (no reference to the iVar)
@synthesize Username; // I suggest you change the name of this variable ; the convention is to start the name of your property with a lower case letter, to not confuse it with a class name
@synthesize Password;
@synthesize webView;
@synthesize webber;
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSString *urlString = @"www.google.com";
[[self.webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]]; // Note the use of self.webView, to use the getter you created by declaring the property
}
@end