@aigens/aigens-sdk-core 0.0.21 → 0.0.22

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.
@@ -149,7 +149,7 @@ public class CorePlugin extends Plugin {
149
149
 
150
150
  }
151
151
  }
152
- if (deeplinkMap != null) {
152
+ if (deeplink != null) {
153
153
  Iterator<String> iter = deeplink.keys();
154
154
  while (iter.hasNext()) {
155
155
  String k = iter.next();
@@ -275,15 +275,15 @@ extension WebContainerViewController: WKNavigationDelegate {
275
275
  }
276
276
 
277
277
  // otherwise, is this a new window or a main frame navigation but to an outside source
278
- let toplevelNavigation = (navigationAction.targetFrame == nil || navigationAction.targetFrame?.isMainFrame == true)
279
- if navURL.absoluteString.contains(bridge.config.serverURL.absoluteString) == false, toplevelNavigation {
280
- // disallow and let the system handle it
281
- if UIApplication.shared.applicationState == .active {
282
- UIApplication.shared.open(navURL, options: [:], completionHandler: nil)
283
- }
284
- decisionHandler(.cancel)
285
- return
286
- }
278
+ // let toplevelNavigation = (navigationAction.targetFrame == nil || navigationAction.targetFrame?.isMainFrame == true)
279
+ // if navURL.absoluteString.contains(bridge.config.serverURL.absoluteString) == false, toplevelNavigation {
280
+ // // disallow and let the system handle it
281
+ // if UIApplication.shared.applicationState == .active {
282
+ // UIApplication.shared.open(navURL, options: [:], completionHandler: nil)
283
+ // }
284
+ // decisionHandler(.cancel)
285
+ // return
286
+ // }
287
287
 
288
288
  // fallthrough to allowing it
289
289
  decisionHandler(.allow)
@@ -316,31 +316,31 @@ extension WebContainerViewController: WKNavigationDelegate {
316
316
  CAPLog.print("⚡️ Error: " + error.localizedDescription)
317
317
  }
318
318
 
319
- // The force unwrap is part of the protocol declaration, so we should keep it.
320
- // swiftlint:disable:next implicitly_unwrapped_optional
321
- public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
322
- webContainerView.showLoading(false)
323
- // cancel
324
- let e = error as NSError
325
- if (e.code == NSURLErrorCancelled || e.code == -999) {
326
- webContainerView.showError(false)
327
- }
328
- CAPLog.print("⚡️ WebView failed provisional navigation")
329
- CAPLog.print("⚡️ Error: " + error.localizedDescription)
330
-
331
- if let errorUrl = webView.url?.absoluteString {
332
- print("navURL-- errorUrl: \(errorUrl)")
333
- if (!self.redirectLink.isEmpty && errorUrl.starts(with: self.redirectLink)) {
334
- webContainerView.showError(false)
335
- webContainerView.showLoading(true)
336
- }else {
337
- webContainerView.showError(true, error.localizedDescription)
338
- }
339
- }else {
340
- webContainerView.showError(true, error.localizedDescription)
341
- }
342
-
343
- }
319
+ // // The force unwrap is part of the protocol declaration, so we should keep it.
320
+ // // swiftlint:disable:next implicitly_unwrapped_optional
321
+ // public func webView(_ webView: WKWebView, didFailProvisionalNavigation navigation: WKNavigation!, withError error: Error) {
322
+ // webContainerView.showLoading(false)
323
+ // // cancel
324
+ // let e = error as NSError
325
+ // if (e.code == NSURLErrorCancelled || e.code == -999) {
326
+ // webContainerView.showError(false)
327
+ // }
328
+ // CAPLog.print("⚡️ WebView failed provisional navigation")
329
+ // CAPLog.print("⚡️ Error: " + error.localizedDescription)
330
+ //
331
+ // if let errorUrl = webView.url?.absoluteString {
332
+ // print("navURL-- errorUrl: \(errorUrl)")
333
+ // if (!self.redirectLink.isEmpty && errorUrl.starts(with: self.redirectLink)) {
334
+ // webContainerView.showError(false)
335
+ // webContainerView.showLoading(true)
336
+ // }else {
337
+ // webContainerView.showError(true, error.localizedDescription)
338
+ // }
339
+ // }else {
340
+ // webContainerView.showError(true, error.localizedDescription)
341
+ // }
342
+ //
343
+ // }
344
344
 
345
345
  public func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
346
346
  webView.reload()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigens/aigens-sdk-core",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Aigens Order.Place Core Plugin",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",