Skip to content

Instantly share code, notes, and snippets.

@koenbok
Created January 23, 2015 16:17
Show Gist options
  • Select an option

  • Save koenbok/aac31b55bfa8f88e4c95 to your computer and use it in GitHub Desktop.

Select an option

Save koenbok/aac31b55bfa8f88e4c95 to your computer and use it in GitHub Desktop.
_webView2 = [[WKWebView alloc] initWithFrame:NSZeroRect configuration:configuration];
WKPageGroupRef pageGroupRef = WKPageGetPageGroup(_webView2.wkView.pageRef);
WKPreferencesRef preferencesRef = WKPageGroupGetPreferences(pageGroupRef);
WKPreferencesSetFileAccessFromFileURLsAllowed(preferencesRef, YES);
NSLog(@"WKPreferencesSetFileAccessFromFileURLsAllowed %ld", (long)WKPreferencesGetFileAccessFromFileURLsAllowed(preferencesRef));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment