@capacitor/ios 3.2.5 → 3.3.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/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.3.3](https://github.com/ionic-team/capacitor/compare/3.3.2...3.3.3) (2021-12-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **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))
12
+
13
+
14
+
15
+
16
+
17
+ ## [3.3.2](https://github.com/ionic-team/capacitor/compare/3.3.1...3.3.2) (2021-11-17)
18
+
19
+ **Note:** Version bump only for package @capacitor/ios
20
+
21
+
22
+
23
+
24
+
25
+ ## [3.3.1](https://github.com/ionic-team/capacitor/compare/3.3.0...3.3.1) (2021-11-05)
26
+
27
+ **Note:** Version bump only for package @capacitor/ios
28
+
29
+
30
+
31
+
32
+
33
+ # [3.3.0](https://github.com/ionic-team/capacitor/compare/3.2.5...3.3.0) (2021-11-03)
34
+
35
+
36
+ ### Bug Fixes
37
+
38
+ * **core:** avoid crash on logging circular objects ([#5186](https://github.com/ionic-team/capacitor/issues/5186)) ([1451ec8](https://github.com/ionic-team/capacitor/commit/1451ec850a9ef73267a032638e73f1fc440647b9))
39
+ * **ios:** Avoid CDVScreenOrientationDelegate umbrella header warning ([#5156](https://github.com/ionic-team/capacitor/issues/5156)) ([31ec30d](https://github.com/ionic-team/capacitor/commit/31ec30de193aa3117dbb7eda928ef3a365d5667c))
40
+
41
+
42
+
43
+
44
+
6
45
  ## [3.2.5](https://github.com/ionic-team/capacitor/compare/3.2.4...3.2.5) (2021-10-13)
7
46
 
8
47
 
@@ -1,7 +1,8 @@
1
1
  framework module Capacitor {
2
2
  umbrella header "Capacitor.h"
3
3
  exclude header "CAPBridgedJSTypes.h"
4
-
4
+ exclude header "CAPBridgeViewController+CDVScreenOrientationDelegate.h"
5
+
5
6
  export *
6
7
  module * { export * }
7
- }
8
+ }
@@ -169,10 +169,15 @@ internal class WebViewDelegationHandler: NSObject, WKNavigationDelegate, WKUIDel
169
169
  // MARK: - WKUIDelegate
170
170
 
171
171
  public func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String, initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
172
- guard let viewController = bridge?.viewController else {
172
+ guard var viewController = bridge?.viewController else {
173
+ completionHandler()
173
174
  return
174
175
  }
175
176
 
177
+ if let presentedVC = viewController.presentedViewController, !presentedVC.isBeingDismissed {
178
+ viewController = presentedVC
179
+ }
180
+
176
181
  let alertController = UIAlertController(title: nil, message: message, preferredStyle: .alert)
177
182
 
178
183
  alertController.addAction(UIAlertAction(title: "Ok", style: .default, handler: { (_) in
@@ -167,21 +167,6 @@ const nativeBridge = (function (exports) {
167
167
  win.Capacitor = cap;
168
168
  win.Ionic.WebView = IonicWebView;
169
169
  };
170
- const safeStringify = (value) => {
171
- const seen = new Set();
172
- return JSON.stringify(value, (_k, v) => {
173
- if (seen.has(v)) {
174
- if (v === null)
175
- return null;
176
- else
177
- return '...';
178
- }
179
- if (typeof v === 'object') {
180
- seen.add(v);
181
- }
182
- return v;
183
- });
184
- };
185
170
  const initLogger = (win, cap) => {
186
171
  const BRIDGED_CONSOLE_METHODS = [
187
172
  'debug',
@@ -248,7 +233,7 @@ const nativeBridge = (function (exports) {
248
233
  const serializeConsoleMessage = (msg) => {
249
234
  if (typeof msg === 'object') {
250
235
  try {
251
- msg = safeStringify(msg);
236
+ msg = JSON.stringify(msg);
252
237
  }
253
238
  catch (e) {
254
239
  // ignore
@@ -317,7 +302,7 @@ const nativeBridge = (function (exports) {
317
302
  postToNative = data => {
318
303
  var _a;
319
304
  try {
320
- win.androidBridge.postMessage(safeStringify(data));
305
+ win.androidBridge.postMessage(JSON.stringify(data));
321
306
  }
322
307
  catch (e) {
323
308
  (_a = win === null || win === void 0 ? void 0 : win.console) === null || _a === void 0 ? void 0 : _a.error(e);
@@ -348,7 +333,7 @@ const nativeBridge = (function (exports) {
348
333
  url: url,
349
334
  line: lineNo,
350
335
  col: columnNo,
351
- errorObject: safeStringify(err),
336
+ errorObject: JSON.stringify(err),
352
337
  },
353
338
  };
354
339
  if (err !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/ios",
3
- "version": "3.2.5",
3
+ "version": "3.3.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)",
@@ -24,10 +24,10 @@
24
24
  "xc:build:CapacitorCordova": "cd CapacitorCordova && xcodebuild && cd .."
25
25
  },
26
26
  "peerDependencies": {
27
- "@capacitor/core": "^3.2.0"
27
+ "@capacitor/core": "^3.3.0"
28
28
  },
29
29
  "publishConfig": {
30
30
  "access": "public"
31
31
  },
32
- "gitHead": "cc2960572ad70a0272c3ea1c44dbee14acf6e2ec"
32
+ "gitHead": "cd8221ed0162454d2ee01dc3bc164de38a81bf43"
33
33
  }