@capacitor/ios 6.2.2 → 6.2.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.
@@ -493,13 +493,13 @@ open class CapacitorBridge: NSObject, CAPBridgeProtocol {
493
493
  let pluginCall = CAPPluginCall(callbackId: call.callbackId, methodName: call.method,
494
494
  options: JSTypes.coerceDictionaryToJSObject(call.options,
495
495
  formattingDatesAsStrings: plugin.shouldStringifyDatesInCalls) ?? [:],
496
- success: {(result: CAPPluginCallResult?, pluginCall: CAPPluginCall?) -> Void in
496
+ success: {(result: CAPPluginCallResult?, pluginCall: CAPPluginCall?) in
497
497
  if let result = result {
498
498
  self?.toJs(result: JSResult(call: call, callResult: result), save: pluginCall?.keepAlive ?? false)
499
499
  } else {
500
500
  self?.toJs(result: JSResult(call: call, result: .dictionary([:])), save: pluginCall?.keepAlive ?? false)
501
501
  }
502
- }, error: {(error: CAPPluginCallError?) -> Void in
502
+ }, error: {(error: CAPPluginCallError?) in
503
503
  if let error = error {
504
504
  self?.toJsError(error: JSResultError(call: call, callError: error))
505
505
  } else {
@@ -146,8 +146,8 @@ extension _JSValueDecoder: Decoder {
146
146
  return date as! T
147
147
  case .formatted(let formatter):
148
148
  guard let value = data as? String else { throw DecodingError.dataCorrupted(data, target: String.self, codingPath: codingPath) }
149
- guard let date = formatter.date(from: value) else { throw DecodingError.dataCorrupted(value, target: Date.self, codingPath: codingPath) }
150
- return date as! T
149
+ guard let date = formatter.date(from: value) else { throw DecodingError.dataCorrupted(value, target: Date.self, codingPath: codingPath) }
150
+ return date as! T
151
151
  case .custom(let decode):
152
152
  return try decode(self) as! T
153
153
  @unknown default:
@@ -155,7 +155,7 @@ extension _JSValueDecoder: Decoder {
155
155
  }
156
156
  case is URL.Type:
157
157
  guard let str = data as? String,
158
- let url = URL(string: str)
158
+ let url = URL(string: str)
159
159
  else { throw DecodingError.dataCorrupted(data, target: URL.self, codingPath: codingPath) }
160
160
 
161
161
  return url as! T
@@ -354,7 +354,7 @@ extension SingleValueContainer: SingleValueDecodingContainer {
354
354
 
355
355
  private func castFloat<N>(to type: N.Type) throws -> N where N: FloatingPoint {
356
356
  if let data = data as? String,
357
- case let .convertFromString(positiveInfinity: pos, negativeInfinity: neg, nan: nan) = options.nonConformingStrategy {
357
+ case let .convertFromString(positiveInfinity: pos, negativeInfinity: neg, nan: nan) = options.nonConformingStrategy {
358
358
  switch data {
359
359
  case pos:
360
360
  return N.infinity
@@ -82,7 +82,6 @@ public final class JSValueEncoder: TopLevelEncoder {
82
82
  self.options = .init(optionalStrategy: optionalEncodingStrategy, dateStrategy: dateEncodingStrategy, dataStrategy: dataEncodingStrategy, nonConformingFloatStrategy: nonConformingFloatEncodingStategy)
83
83
  }
84
84
 
85
-
86
85
  /// Encodes an `Encodable` value to a ``JSValue``
87
86
  /// - Parameter value: The value to encode to ``JSValue``
88
87
  /// - Returns: The encoded ``JSValue``
@@ -143,7 +143,7 @@ open class WebViewAssetHandler: NSObject, WKURLSchemeHandler {
143
143
  func handleCapacitorHttpRequest(_ urlSchemeTask: WKURLSchemeTask, _ localUrl: URL, _ isHttpsRequest: Bool) {
144
144
  var urlRequest = urlSchemeTask.request
145
145
  guard let url = urlRequest.url else { return }
146
-
146
+
147
147
  let urlComponents = URLComponents(url: url, resolvingAgainstBaseURL: false)
148
148
  if let targetUrl = urlComponents?.queryItems?.first(where: { $0.name == CapacitorBridge.httpInterceptorUrlParam })?.value,
149
149
  !targetUrl.isEmpty {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/ios",
3
- "version": "6.2.2",
3
+ "version": "6.2.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)",