Skip to content

Commit 8241c81

Browse files
authored
fix(cordova): patch usages of webView superview (#3177)
1 parent e28a1ff commit 8241c81

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cli/src/ios/update.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ function copyPluginsNativeFiles(config: Config, cordovaPlugins: Plugin[]) {
303303
fileContent = fileContent.replace('[NSBundle bundleForClass:[CDVCapture class]]', '[NSBundle mainBundle]');
304304
writeFileSync(fileDest, fileContent, 'utf8');
305305
}
306+
if (fileContent.includes('[self.webView superview]') || fileContent.includes('self.webView.superview')) {
307+
fileContent = fileContent.replace(/\[self.webView superview\]/g, 'self.viewController.view');
308+
fileContent = fileContent.replace(/self.webView.superview/g, 'self.viewController.view');
309+
writeFileSync(fileDest, fileContent, 'utf8');
310+
}
306311
}
307312
}
308313
});

0 commit comments

Comments
 (0)