Skip to content

Commit

Permalink
(ios): rename CDVWKProcessPoolFactory (#825)
Browse files Browse the repository at this point in the history
* (ios): rename CDVWKProcessPoolFactory

CDVWKProcessPoolFactory was integrated from the WKWebView plugin with
the new name: CDVWebViewProcessPoolFactory

* (ios): Allow both processpool imports
  • Loading branch information
NiklasMerz committed Jan 7, 2021
1 parent 8bdbd18 commit de31942
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ios/CDVWKInAppBrowser.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ Licensed to the Apache Software Foundation (ASF) under one

#import "CDVWKInAppBrowser.h"

#if __has_include("CDVWKProcessPoolFactory.h")
#import "CDVWKProcessPoolFactory.h"
#if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>) // Cordova-iOS >=6
#import <Cordova/CDVWebViewProcessPoolFactory.h>
#elif __has_include("CDVWKProcessPoolFactory.h") // Cordova-iOS <6 with WKWebView plugin
#import "CDVWKProcessPoolFactory.h"
#endif

#import <Cordova/CDVPluginResult.h>
Expand Down Expand Up @@ -739,7 +741,9 @@ - (void)createViews
}
configuration.applicationNameForUserAgent = userAgent;
configuration.userContentController = userContentController;
#if __has_include("CDVWKProcessPoolFactory.h")
#if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>)
configuration.processPool = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
#elif __has_include("CDVWKProcessPoolFactory.h")
configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool];
#endif
[configuration.userContentController addScriptMessageHandler:self name:IAB_BRIDGE_NAME];
Expand Down

0 comments on commit de31942

Please sign in to comment.