@@ -16,6 +16,7 @@ extern void callWithWebView(WKWebView *, HsStablePtr);
1616HsStablePtr global_willFinishLaunchingWithOptions = 0;
1717HsStablePtr global_didFinishLaunchingWithOptions = 0;
1818HsStablePtr global_applicationUniversalLink = 0;
19+uint64_t global_developerExtrasEnabled = 1;
1920
2021@implementation AppDelegate
2122
@@ -39,7 +40,9 @@ HsStablePtr global_applicationUniversalLink = 0;
3940
4041-(void)applicationWillFinishLaunching:(NSNotification *)notification {
4142 WKWebViewConfiguration *theConfiguration = [[WKWebViewConfiguration alloc] init];
42− [theConfiguration.preferences setValue:@YES forKey:@"developerExtrasEnabled"];
43+ if (global_developerExtrasEnabled) {
44+ [theConfiguration.preferences setValue:@YES forKey:@"developerExtrasEnabled"];
45+ }
4346 WKWebView *webView = [[WKWebView alloc] initWithFrame: [_window.contentView frame] configuration:theConfiguration];
4447 [_window setContentView:webView];
4548 callWithWebView(webView, _handler);
@@ -89,11 +92,13 @@ void runInWKWebView(HsStablePtr handler,
8992 const uint64_t hs_requestAuthorizationOptionCarPlay,
9093 const uint64_t hs_registerForRemoteNotifications,
9194 HsStablePtr hs_didRegisterForRemoteNotificationsWithDeviceToken,
92− HsStablePtr hs_didFailToRegisterForRemoteNotificationsWithError) {
95+ HsStablePtr hs_didFailToRegisterForRemoteNotificationsWithError,
96+ const uint64_t hs_developerExtrasEnabled) {
9397 @autoreleasepool {
9498 global_willFinishLaunchingWithOptions = hs_willFinishLaunchingWithOptions;
9599 global_didFinishLaunchingWithOptions = hs_didFinishLaunchingWithOptions;
96100 global_applicationUniversalLink = hs_applicationUniversalLink;
101+ global_developerExtrasEnabled = hs_developerExtrasEnabled;
97102 NSApplication *application = [NSApplication sharedApplication];
98103 AppDelegate *appDelegate = [[AppDelegate alloc] initApp:handler progName:[NSString stringWithCString:progName encoding:NSUTF8StringEncoding]];
99104 [application setDelegate:appDelegate];