@capacitor/ios 3.3.1 → 3.4.0
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,45 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.4.0](https://github.com/ionic-team/capacitor/compare/3.3.4...3.4.0) (2022-01-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ios:** Add new iOS 15 Motion permission delegate ([#5317](https://github.com/ionic-team/capacitor/issues/5317)) ([c05a3cb](https://github.com/ionic-team/capacitor/commit/c05a3cbbf02217e3972d5e067970cae18bff3faa))
|
|
12
|
+
* **ios:** Add new iOS15 media capture permission delegate ([#5196](https://github.com/ionic-team/capacitor/issues/5196)) ([d8b54ac](https://github.com/ionic-team/capacitor/commit/d8b54ac23414bfe56e50e1254066630a6f87eb0e))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## [3.3.4](https://github.com/ionic-team/capacitor/compare/3.3.3...3.3.4) (2022-01-05)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @capacitor/ios
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [3.3.3](https://github.com/ionic-team/capacitor/compare/3.3.2...3.3.3) (2021-12-08)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **ios:** Present js alert on top of the presented VC ([#5282](https://github.com/ionic-team/capacitor/issues/5282)) ([a53d236](https://github.com/ionic-team/capacitor/commit/a53d236452e99d1e6151e19e313b3d1545957419))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [3.3.2](https://github.com/ionic-team/capacitor/compare/3.3.1...3.3.2) (2021-11-17)
|
|
38
|
+
|
|
39
|
+
**Note:** Version bump only for package @capacitor/ios
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
6
45
|
## [3.3.1](https://github.com/ionic-team/capacitor/compare/3.3.0...3.3.1) (2021-11-05)
|
|
7
46
|
|
|
8
47
|
**Note:** Version bump only for package @capacitor/ios
|
|
@@ -46,6 +46,28 @@ internal class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDel
|
|
|
46
46
|
// Reset the bridge on each navigation
|
|
47
47
|
bridge?.reset()
|
|
48
48
|
}
|
|
49
|
+
|
|
50
|
+
// TODO: remove once Xcode 12 support is dropped
|
|
51
|
+
#if compiler(>=5.5)
|
|
52
|
+
@available(iOS 15, *)
|
|
53
|
+
func webView(
|
|
54
|
+
_ webView: WKWebView,
|
|
55
|
+
requestMediaCapturePermissionFor origin: WKSecurityOrigin,
|
|
56
|
+
initiatedByFrame frame: WKFrameInfo,
|
|
57
|
+
type: WKMediaCaptureType,
|
|
58
|
+
decisionHandler: @escaping (WKPermissionDecision) -> Void
|
|
59
|
+
) {
|
|
60
|
+
decisionHandler(.grant)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@available(iOS 15, *)
|
|
64
|
+
func webView(_ webView: WKWebView,
|
|
65
|
+
requestDeviceOrientationAndMotionPermissionFor origin: WKSecurityOrigin,
|
|
66
|
+
initiatedByFrame frame: WKFrameInfo,
|
|
67
|
+
decisionHandler: @escaping (WKPermissionDecision) -> Void) {
|
|
68
|
+
decisionHandler(.grant)
|
|
69
|
+
}
|
|
70
|
+
#endif
|
|
49
71
|
|
|
50
72
|
public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) {
|
|
51
73
|
// post a notification for any listeners
|
|
@@ -169,10 +191,15 @@ internal class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDel
|
|
|
169
191
|
// MARK: - WKUIDelegate
|
|
170
192
|
|
|
171
193
|
public func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
|
|
172
|
-
guard
|
|
194
|
+
guard var viewController = bridge?.viewController else {
|
|
195
|
+
completionHandler()
|
|
173
196
|
return
|
|
174
197
|
}
|
|
175
198
|
|
|
199
|
+
if let presentedVC = viewController.presentedViewController, !presentedVC.isBeingDismissed {
|
|
200
|
+
viewController = presentedVC
|
|
201
|
+
}
|
|
202
|
+
|
|
176
203
|
let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert)
|
|
177
204
|
|
|
178
205
|
alertController.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) in
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/ios",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
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)",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"xc:build:CapacitorCordova": "cd CapacitorCordova && xcodebuild && cd .."
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@capacitor/core": "^3.
|
|
27
|
+
"@capacitor/core": "^3.4.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "4e84c04251167ea8212969fead84b6a1d694b561"
|
|
33
33
|
}
|