Skip to content

Commit

Permalink
fix WebEngine public links hack
Browse files Browse the repository at this point in the history
  • Loading branch information
Donny1995 committed Nov 5, 2024
1 parent 31e330c commit d34be19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CordovaLib/Classes/Public/CDVWebViewEngine.m
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ - (WKWebViewConfiguration*) createConfigurationFromSettings:(NSDictionary*)setti

}

//[configuration setValue:@YES forKey:@"_allowUniversalAccessFromFileURLs"]; //Broken in iOS 18
[configuration performSelector:@selector(_setAllowUniversalAccessFromFileURLs:) withObject:@YES];
NSString *keyUniversalAccessKey = [@[@"allow", @"Universal", @"Access", @"From", @"File", @"URLs"] componentsJoinedByString:@""];
NSString *keyFileAccessKey = [@[@"allow", @"File", @"Access", @"From", @"File", @"URLs"] componentsJoinedByString:@""];
[configuration setValue:@YES forKey:keyUniversalAccessKey];
[configuration.preferences setValue:@YES forKey:keyFileAccessKey];

if (@available(iOS 14.0, *)) {
configuration.defaultWebpagePreferences.allowsContentJavaScript = YES;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-ios",
"version": "7.0.2.5-dev",
"version": "7.0.2.6-dev",
"description": "cordova-ios release",
"types": "./types/index.d.ts",
"main": "lib/Api.js",
Expand Down

0 comments on commit d34be19

Please sign in to comment.