From 8241c818686271e46bb164eec0f2287cc6394a65 Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Mon, 6 Jul 2020 19:27:04 +0200 Subject: [PATCH] fix(cordova): patch usages of webView superview (#3177) --- cli/src/ios/update.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cli/src/ios/update.ts b/cli/src/ios/update.ts index 6ec1176a47..9a80037c81 100644 --- a/cli/src/ios/update.ts +++ b/cli/src/ios/update.ts @@ -303,6 +303,11 @@ function copyPluginsNativeFiles(config: Config, cordovaPlugins: Plugin[]) { fileContent = fileContent.replace('[NSBundle bundleForClass:[CDVCapture class]]', '[NSBundle mainBundle]'); writeFileSync(fileDest, fileContent, 'utf8'); } + if (fileContent.includes('[self.webView superview]') || fileContent.includes('self.webView.superview')) { + fileContent = fileContent.replace(/\[self.webView superview\]/g, 'self.viewController.view'); + fileContent = fileContent.replace(/self.webView.superview/g, 'self.viewController.view'); + writeFileSync(fileDest, fileContent, 'utf8'); + } } } });