Skip to content

Commit b6abcb7

Browse files
fix(ios): Silence WKProcessPool warning (#8184)
1 parent 5767c45 commit b6abcb7

File tree

5 files changed

+39
-0
lines changed

5 files changed

+39
-0
lines changed

ios/CapacitorCordova/CapacitorCordova.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
0B61A7E52B114AA00035F2DB /* CDVWebViewProcessPoolFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B61A7E32B114A9F0035F2DB /* CDVWebViewProcessPoolFactory.m */; };
1111
0B61A7E62B114AA00035F2DB /* CDVWebViewProcessPoolFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 0B61A7E42B114AA00035F2DB /* CDVWebViewProcessPoolFactory.h */; settings = {ATTRIBUTES = (Public, ); }; };
12+
1DBF5C182E9E908A00FAC24F /* CDVAvailabilityDeprecated.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DBF5C172E9E908A00FAC24F /* CDVAvailabilityDeprecated.h */; settings = {ATTRIBUTES = (Public, ); }; };
1213
2F4F657C2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4F657A2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.m */; };
1314
2F4F657D2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F4F657B2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; };
1415
2F5C86E11FE94845004B09C7 /* CapacitorCordova.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5C86DF1FE94845004B09C7 /* CapacitorCordova.h */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -42,6 +43,7 @@
4243
/* Begin PBXFileReference section */
4344
0B61A7E32B114A9F0035F2DB /* CDVWebViewProcessPoolFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewProcessPoolFactory.m; sourceTree = "<group>"; };
4445
0B61A7E42B114AA00035F2DB /* CDVWebViewProcessPoolFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewProcessPoolFactory.h; sourceTree = "<group>"; };
46+
1DBF5C172E9E908A00FAC24F /* CDVAvailabilityDeprecated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVAvailabilityDeprecated.h; sourceTree = "<group>"; };
4547
2F4F657A2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
4648
2F4F657B2091F1FD00EAA994 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
4749
2F5C86DC1FE94845004B09C7 /* Cordova.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cordova.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -129,6 +131,7 @@
129131
2FE19E2920473160002A4E89 /* AppDelegate.m */,
130132
2F5C87131FE98417004B09C7 /* CDV.h */,
131133
2F5C871A1FE98418004B09C7 /* CDVAvailability.h */,
134+
1DBF5C172E9E908A00FAC24F /* CDVAvailabilityDeprecated.h */,
132135
2F5C87171FE98417004B09C7 /* CDVCommandDelegate.h */,
133136
2F5C87141FE98417004B09C7 /* CDVCommandDelegateImpl.m */,
134137
2F5C87181FE98417004B09C7 /* CDVCommandDelegateImpl.h */,
@@ -180,6 +183,7 @@
180183
62959B66252524CD00A3D7F1 /* CDVScreenOrientationDelegate.h in Headers */,
181184
0B61A7E62B114AA00035F2DB /* CDVWebViewProcessPoolFactory.h in Headers */,
182185
62959B6A252524D700A3D7F1 /* CDVPluginManager.h in Headers */,
186+
1DBF5C182E9E908A00FAC24F /* CDVAvailabilityDeprecated.h in Headers */,
183187
2F5C86E11FE94845004B09C7 /* CapacitorCordova.h in Headers */,
184188
);
185189
runOnlyForDeploymentPostprocessing = 0;

ios/CapacitorCordova/CapacitorCordova/CapacitorCordova.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ FOUNDATION_EXPORT const unsigned char CapacitorCordovaVersionString[];
99
#import <Cordova/AppDelegate.h>
1010
#import <Cordova/CDV.h>
1111
#import <Cordova/CDVAvailability.h>
12+
#import <Cordova/CDVAvailabilityDeprecated.h>
1213
#import <Cordova/CDVCommandDelegate.h>
1314
#import <Cordova/CDVCommandDelegateImpl.h>
1415
#import <Cordova/CDVConfigParser.h>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one
3+
or more contributor license agreements. See the NOTICE file
4+
distributed with this work for additional information
5+
regarding copyright ownership. The ASF licenses this file
6+
to you under the Apache License, Version 2.0 (the
7+
"License"); you may not use this file except in compliance
8+
with the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing,
13+
software distributed under the License is distributed on an
14+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
KIND, either express or implied. See the License for the
16+
specific language governing permissions and limitations
17+
under the License.
18+
*/
19+
20+
#define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg)))
21+
#define CDV_DEPRECATED_WITH_REPLACEMENT(version, msg, repl) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg, repl)))

ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVWebViewProcessPoolFactory.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@
1818
*/
1919

2020
#import <WebKit/WebKit.h>
21+
#import <Cordova/CDVAvailabilityDeprecated.h>
2122

23+
/**
24+
@Metadata {
25+
@Available(Cordova, introduced: "6.2.0", deprecated: "8.0.0")
26+
}
27+
*/
28+
CDV_DEPRECATED(8.0.0, "WebKit WKProcessPool is deprecated in iOS")
2229
@interface CDVWebViewProcessPoolFactory : NSObject
2330
@property (nonatomic, retain) WKProcessPool* sharedPool;
2431

ios/CapacitorCordova/CapacitorCordova/Classes/Public/CDVWebViewProcessPoolFactory.m

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ Licensed to the Apache Software Foundation (ASF) under one
2121
@import WebKit;
2222
#import <Cordova/CDVWebViewProcessPoolFactory.h>
2323

24+
#pragma clang diagnostic push
25+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
26+
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
27+
2428
static CDVWebViewProcessPoolFactory *factory = nil;
2529

2630
@implementation CDVWebViewProcessPoolFactory
@@ -47,3 +51,5 @@ - (WKProcessPool*) sharedProcessPool {
4751
return _sharedPool;
4852
}
4953
@end
54+
55+
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)