Skip to content

Commit de31942

Browse files
authored
(ios): rename CDVWKProcessPoolFactory (apache#825)
* (ios): rename CDVWKProcessPoolFactory CDVWKProcessPoolFactory was integrated from the WKWebView plugin with the new name: CDVWebViewProcessPoolFactory * (ios): Allow both processpool imports
1 parent 8bdbd18 commit de31942

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/ios/CDVWKInAppBrowser.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ Licensed to the Apache Software Foundation (ASF) under one
1919

2020
#import "CDVWKInAppBrowser.h"
2121

22-
#if __has_include("CDVWKProcessPoolFactory.h")
23-
#import "CDVWKProcessPoolFactory.h"
22+
#if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>) // Cordova-iOS >=6
23+
#import <Cordova/CDVWebViewProcessPoolFactory.h>
24+
#elif __has_include("CDVWKProcessPoolFactory.h") // Cordova-iOS <6 with WKWebView plugin
25+
#import "CDVWKProcessPoolFactory.h"
2426
#endif
2527

2628
#import <Cordova/CDVPluginResult.h>
@@ -739,7 +741,9 @@ - (void)createViews
739741
}
740742
configuration.applicationNameForUserAgent = userAgent;
741743
configuration.userContentController = userContentController;
742-
#if __has_include("CDVWKProcessPoolFactory.h")
744+
#if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>)
745+
configuration.processPool = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
746+
#elif __has_include("CDVWKProcessPoolFactory.h")
743747
configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool];
744748
#endif
745749
[configuration.userContentController addScriptMessageHandler:self name:IAB_BRIDGE_NAME];

0 commit comments

Comments
 (0)