Skip to content

Commit 1da84ce

Browse files
NiklasMerzFE-Roger
authored andcommitted
(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 a47fc57 commit 1da84ce

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>
@@ -767,7 +769,9 @@ - (void)createViews
767769
}
768770
configuration.applicationNameForUserAgent = userAgent;
769771
configuration.userContentController = userContentController;
770-
#if __has_include("CDVWKProcessPoolFactory.h")
772+
#if __has_include(<Cordova/CDVWebViewProcessPoolFactory.h>)
773+
configuration.processPool = [[CDVWebViewProcessPoolFactory sharedFactory] sharedProcessPool];
774+
#elif __has_include("CDVWKProcessPoolFactory.h")
771775
configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool];
772776
#endif
773777
[configuration.userContentController addScriptMessageHandler:self name:IAB_BRIDGE_NAME];

0 commit comments

Comments
 (0)