In my window controller, I have this:
- (void)windowDidLoad {
[super windowDidLoad];
NSLog(@"webView = %@", webView);
[[webView mainFrame] loadRequest:
[NSURLRequest requestWithURL:
[NSURL URLWithString:@"http://www.apple.com/"]]];
}
My understanding is that should make the webView in my window now download and render Apple’s home page. But all I see in a white panel. What am I missing?
(I’ve checked that webView is not null; NSLog shows something like
“webView = <WebView: 0x10be7c3b0>”)
I’ve also tried the more modern approach, but still had no success:
[webView setMainFrameURL:@"http://www.apple.com/"];
As this project is sandboxed, the solution in this case was to add the relevant entitlement to the project.