Last active
August 29, 2015 14:05
-
-
Save koenbok/fd66be1bff6098a9c8ff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // AppDelegate.m | |
| // Webkit2Test | |
| // | |
| // Created by Koen Bok on 08/08/14. | |
| // Copyright (c) 2014 Koen Bok. All rights reserved. | |
| // | |
| #import "AppDelegate.h" | |
| @interface AppDelegate () | |
| @property (weak) IBOutlet NSWindow *window; | |
| @end | |
| @implementation AppDelegate | |
| - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | |
| // Insert code here to initialize your application | |
| NSView *contentView = self.window.contentView; | |
| WKWebView *webView = [[WKWebView alloc] initWithFrame:contentView.frame]; | |
| NSString *path = @"/Users/koen/Desktop/Poop.framer"; | |
| NSURL *pathUrl = [NSURL fileURLWithPath:path isDirectory:YES]; | |
| NSString *indexPath = [path stringByAppendingPathComponent:@"index.html"]; | |
| [webView loadHTMLString:[NSString stringWithContentsOfFile:indexPath encoding:NSUTF8StringEncoding error:nil] baseURL:pathUrl]; | |
| [contentView addSubview:webView]; | |
| } | |
| - (void)applicationWillTerminate:(NSNotification *)aNotification { | |
| // Insert code here to tear down your application | |
| } | |
| @end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 08/08/14 00:22:51,000 kernel[0]: Sandbox: com.apple.WebKit(4702) deny file-issue-extension <path>/my-script.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment