Skip to content

Commit

Permalink
fix(cordova): patch usages of webView superview (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcesarmobile authored Jul 6, 2020
1 parent e28a1ff commit 8241c81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/src/ios/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
}
});
Expand Down

0 comments on commit 8241c81

Please sign in to comment.