@capacitor/ios 8.0.0-alpha.2 → 8.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Capacitor/Capacitor/WKWebView+Capacitor.swift +0 -1
- package/Capacitor/Capacitor/WebViewAssetHandler.swift +5 -5
- package/Capacitor/Capacitor/WebViewDelegationHandler.swift +1 -2
- package/CapacitorCordova/CapacitorCordova/CapacitorCordova.h +1 -0
- package/CapacitorCordova/CapacitorCordova/Classes/Public/CDVAvailabilityDeprecated.h +21 -0
- package/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPlugin.h +1 -7
- package/CapacitorCordova/CapacitorCordova/Classes/Public/CDVPlugin.m +0 -18
- package/CapacitorCordova/CapacitorCordova/Classes/Public/CDVWebViewProcessPoolFactory.h +7 -0
- package/CapacitorCordova/CapacitorCordova/Classes/Public/CDVWebViewProcessPoolFactory.m +6 -0
- package/package.json +3 -3
|
@@ -62,7 +62,6 @@ internal extension WKWebView {
|
|
|
62
62
|
method_setImplementation(method, imp)
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
// iOS 13+
|
|
66
65
|
let selectorMkIV: Selector = sel_getUid("_elementDidFocus:userIsInteracting:blurPreviousNode:activityStateChanges:userObject:")
|
|
67
66
|
|
|
68
67
|
if let method = class_getInstanceMethod(targetClass, selectorMkIV) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Foundation
|
|
2
|
-
import
|
|
2
|
+
import UniformTypeIdentifiers
|
|
3
3
|
|
|
4
4
|
@objc(CAPWebViewAssetHandler)
|
|
5
5
|
// swiftlint:disable type_body_length
|
|
@@ -106,12 +106,12 @@ open class WebViewAssetHandler: NSObject, WKURLSchemeHandler {
|
|
|
106
106
|
|
|
107
107
|
open func mimeTypeForExtension(pathExtension: String) -> String {
|
|
108
108
|
if !pathExtension.isEmpty {
|
|
109
|
-
if let uti =
|
|
110
|
-
if let mimetype =
|
|
111
|
-
return mimetype
|
|
109
|
+
if let uti = UTType(filenameExtension: pathExtension) {
|
|
110
|
+
if let mimetype = uti.preferredMIMEType {
|
|
111
|
+
return mimetype
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
// TODO: Remove
|
|
114
|
+
// TODO: Remove when deployment target is set to iOS 17
|
|
115
115
|
if let mimeType = mimeTypes[pathExtension] {
|
|
116
116
|
return mimeType
|
|
117
117
|
}
|
|
@@ -47,7 +47,6 @@ open class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDelegat
|
|
|
47
47
|
bridge?.reset()
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
@available(iOS 15, *)
|
|
51
50
|
open func webView(
|
|
52
51
|
_ webView: WKWebView,
|
|
53
52
|
requestMediaCapturePermissionFor origin: WKSecurityOrigin,
|
|
@@ -58,7 +57,6 @@ open class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDelegat
|
|
|
58
57
|
decisionHandler(.grant)
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
@available(iOS 15, *)
|
|
62
60
|
open func webView(_ webView: WKWebView,
|
|
63
61
|
requestDeviceOrientationAndMotionPermissionFor origin: WKSecurityOrigin,
|
|
64
62
|
initiatedByFrame frame: WKFrameInfo,
|
|
@@ -159,6 +157,7 @@ open class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDelegat
|
|
|
159
157
|
|
|
160
158
|
open func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
|
|
161
159
|
CAPLog.print("⚡️ WebView process terminated")
|
|
160
|
+
bridge?.reset()
|
|
162
161
|
webView.reload()
|
|
163
162
|
}
|
|
164
163
|
|
|
@@ -9,6 +9,7 @@ FOUNDATION_EXPORT const unsigned char CapacitorCordovaVersionString[];
|
|
|
9
9
|
#import <Cordova/AppDelegate.h>
|
|
10
10
|
#import <Cordova/CDV.h>
|
|
11
11
|
#import <Cordova/CDVAvailability.h>
|
|
12
|
+
#import <Cordova/CDVAvailabilityDeprecated.h>
|
|
12
13
|
#import <Cordova/CDVCommandDelegate.h>
|
|
13
14
|
#import <Cordova/CDVCommandDelegateImpl.h>
|
|
14
15
|
#import <Cordova/CDVConfigParser.h>
|
|
@@ -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)))
|
|
@@ -24,12 +24,6 @@
|
|
|
24
24
|
#import "CDVAvailability.h"
|
|
25
25
|
#import <WebKit/WebKit.h>
|
|
26
26
|
|
|
27
|
-
@interface UIView (org_apache_cordova_UIView_Extension)
|
|
28
|
-
|
|
29
|
-
@property (nonatomic, weak) UIScrollView* scrollView;
|
|
30
|
-
|
|
31
|
-
@end
|
|
32
|
-
|
|
33
27
|
extern NSString* const CDVPageDidLoadNotification;
|
|
34
28
|
extern NSString* const CDVPluginHandleOpenURLNotification;
|
|
35
29
|
extern NSString* const CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification;
|
|
@@ -54,7 +48,7 @@ extern NSString* const CDVViewWillTransitionToSizeNotification;
|
|
|
54
48
|
@interface CDVPlugin : NSObject {}
|
|
55
49
|
|
|
56
50
|
- (instancetype)initWithWebViewEngine:(WKWebView *)theWebViewEngine;
|
|
57
|
-
@property (nonatomic, weak)
|
|
51
|
+
@property (nonatomic, weak) WKWebView* webView;
|
|
58
52
|
@property (nonatomic, weak) WKWebView * webViewEngine;
|
|
59
53
|
@property (nonatomic, strong) NSString * className;
|
|
60
54
|
|
|
@@ -18,24 +18,6 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
#import "CDVPlugin.h"
|
|
21
|
-
#include <objc/message.h>
|
|
22
|
-
|
|
23
|
-
@implementation UIView (org_apache_cordova_UIView_Extension)
|
|
24
|
-
|
|
25
|
-
@dynamic scrollView;
|
|
26
|
-
|
|
27
|
-
- (UIScrollView*)scrollView
|
|
28
|
-
{
|
|
29
|
-
SEL scrollViewSelector = NSSelectorFromString(@"scrollView");
|
|
30
|
-
|
|
31
|
-
if ([self respondsToSelector:scrollViewSelector]) {
|
|
32
|
-
return ((id (*)(id, SEL))objc_msgSend)(self, scrollViewSelector);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return nil;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@end
|
|
39
21
|
|
|
40
22
|
NSString* const CDVPageDidLoadNotification = @"CDVPageDidLoadNotification";
|
|
41
23
|
NSString* const CDVPluginHandleOpenURLNotification = @"CDVPluginHandleOpenURLNotification";
|
|
@@ -18,7 +18,14 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
#import <WebKit/WebKit.h>
|
|
21
|
+
#import <Cordova/CDVAvailabilityDeprecated.h>
|
|
21
22
|
|
|
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")
|
|
22
29
|
@interface CDVWebViewProcessPoolFactory : NSObject
|
|
23
30
|
@property (nonatomic, retain) WKProcessPool* sharedPool;
|
|
24
31
|
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
@import WebKit;
|
|
22
22
|
#import <Cordova/CDVWebViewProcessPoolFactory.h>
|
|
23
23
|
|
|
24
|
+
#pragma clang diagnostic push
|
|
25
|
+
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
26
|
+
#pragma clang diagnostic ignored "-Wdeprecated-implementations"
|
|
27
|
+
|
|
24
28
|
static CDVWebViewProcessPoolFactory *factory = nil;
|
|
25
29
|
|
|
26
30
|
@implementation CDVWebViewProcessPoolFactory
|
|
@@ -47,3 +51,5 @@ static CDVWebViewProcessPoolFactory *factory = nil;
|
|
|
47
51
|
return _sharedPool;
|
|
48
52
|
}
|
|
49
53
|
@end
|
|
54
|
+
|
|
55
|
+
#pragma clang diagnostic pop
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/ios",
|
|
3
|
-
"version": "8.0.0-alpha.
|
|
3
|
+
"version": "8.0.0-alpha.3",
|
|
4
4
|
"description": "Capacitor: Cross-platform apps with JavaScript and the web",
|
|
5
5
|
"homepage": "https://capacitorjs.com",
|
|
6
6
|
"author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"verify": "npm run xc:build:Capacitor && npm run xc:build:CapacitorCordova",
|
|
24
|
-
"xc:build:Capacitor": "cd Capacitor && xcodebuild clean test -workspace Capacitor.xcworkspace -scheme Capacitor -destination 'platform=iOS Simulator,name=iPhone 16,OS=
|
|
24
|
+
"xc:build:Capacitor": "cd Capacitor && xcodebuild clean test -workspace Capacitor.xcworkspace -scheme Capacitor -destination 'platform=iOS Simulator,name=iPhone 16,OS=26.0' && cd ..",
|
|
25
25
|
"xc:build:CapacitorCordova": "cd CapacitorCordova && xcodebuild && cd .."
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@capacitor/core": "^8.0.0-alpha.
|
|
28
|
+
"@capacitor/core": "^8.0.0-alpha.3"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|