WKWebView is not rendering WebGL Content.Showing White screen

I have integrated WKWebView to load HTML game in my app. All is working fine in the app. When I tried to load WebGL in WKWebView its not working while using CANVAS its working fine.


Can you please let me know WKWebView support WebGL or not?


WKWebViewConfiguration *webConfiguration = [[WKWebViewConfiguration alloc] init];

[webConfiguration setMediaTypesRequiringUserActionForPlayback:WKAudiovisualMediaTypeNone];

[webConfiguration setAllowsInlineMediaPlayback:YES];

[webConfiguration setSuppressesIncrementalRendering:YES];


self.webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.height, self.view.frame.size.width) configuration:webConfiguration];

self.webView.navigationDelegate = self;

self.webView.UIDelegate = self;

[self.view addSubview:webView];


NSURL *fileUrl = [NSURL fileURLWithPath:self.stringUrl];

NSString *readAccessPath = indexDirectoryPath;

NSURL *readAccessUrl = [NSURL fileURLWithPath:readAccessPath];

[self.webView loadFileURL:fileUrl allowingReadAccessToURL:readAccessUrl]; //read access to


I tried with above code but it is not working fine and also lots of search on google but can't find the proper solution. So please help me to sort out this issue.


Thanks