@blueid/access-capacitor 0.88.0 → 0.89.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.
@@ -10,15 +10,18 @@
10
10
  <key>HeadersPath</key>
11
11
  <string>Headers</string>
12
12
  <key>LibraryIdentifier</key>
13
- <string>ios-arm64</string>
13
+ <string>ios-arm64_x86_64-simulator</string>
14
14
  <key>LibraryPath</key>
15
15
  <string>libCBlueIDAccess.a</string>
16
16
  <key>SupportedArchitectures</key>
17
17
  <array>
18
18
  <string>arm64</string>
19
+ <string>x86_64</string>
19
20
  </array>
20
21
  <key>SupportedPlatform</key>
21
22
  <string>ios</string>
23
+ <key>SupportedPlatformVariant</key>
24
+ <string>simulator</string>
22
25
  </dict>
23
26
  <dict>
24
27
  <key>BinaryPath</key>
@@ -43,18 +46,15 @@
43
46
  <key>HeadersPath</key>
44
47
  <string>Headers</string>
45
48
  <key>LibraryIdentifier</key>
46
- <string>ios-arm64_x86_64-simulator</string>
49
+ <string>ios-arm64</string>
47
50
  <key>LibraryPath</key>
48
51
  <string>libCBlueIDAccess.a</string>
49
52
  <key>SupportedArchitectures</key>
50
53
  <array>
51
54
  <string>arm64</string>
52
- <string>x86_64</string>
53
55
  </array>
54
56
  <key>SupportedPlatform</key>
55
57
  <string>ios</string>
56
- <key>SupportedPlatformVariant</key>
57
- <string>simulator</string>
58
58
  </dict>
59
59
  </array>
60
60
  <key>CFBundlePackageType</key>
@@ -104,6 +104,7 @@ typedef enum BlueReturnCode {
104
104
  BlueReturnCode_SdkDecodeBase64Failed = -413,
105
105
  BlueReturnCode_SdkDecodeJsonFailed = -414,
106
106
  BlueReturnCode_SdkFetchDataFailed = -415,
107
+ BlueReturnCode_SdkTimeout = -416,
107
108
  BlueReturnCode_OssMAReturnCodeStart = -1000,
108
109
  BlueReturnCode_OssMAReturnCodeEnd = -1100
109
110
  } BlueReturnCode_t;
@@ -104,6 +104,7 @@ typedef enum BlueReturnCode {
104
104
  BlueReturnCode_SdkDecodeBase64Failed = -413,
105
105
  BlueReturnCode_SdkDecodeJsonFailed = -414,
106
106
  BlueReturnCode_SdkFetchDataFailed = -415,
107
+ BlueReturnCode_SdkTimeout = -416,
107
108
  BlueReturnCode_OssMAReturnCodeStart = -1000,
108
109
  BlueReturnCode_OssMAReturnCodeEnd = -1100
109
110
  } BlueReturnCode_t;
@@ -104,6 +104,7 @@ typedef enum BlueReturnCode {
104
104
  BlueReturnCode_SdkDecodeBase64Failed = -413,
105
105
  BlueReturnCode_SdkDecodeJsonFailed = -414,
106
106
  BlueReturnCode_SdkFetchDataFailed = -415,
107
+ BlueReturnCode_SdkTimeout = -416,
107
108
  BlueReturnCode_OssMAReturnCodeStart = -1000,
108
109
  BlueReturnCode_OssMAReturnCodeEnd = -1100
109
110
  } BlueReturnCode_t;
@@ -123,6 +123,7 @@ public enum BlueReturnCode: SwiftProtobuf.Enum {
123
123
  case sdkDecodeBase64Failed // = -413
124
124
  case sdkDecodeJsonFailed // = -414
125
125
  case sdkFetchDataFailed // = -415
126
+ case sdkTimeout // = -416
126
127
  case ossMareturnCodeStart // = -1000
127
128
  case ossMareturnCodeEnd // = -1100
128
129
 
@@ -134,6 +135,7 @@ public enum BlueReturnCode: SwiftProtobuf.Enum {
134
135
  switch rawValue {
135
136
  case -1100: self = .ossMareturnCodeEnd
136
137
  case -1000: self = .ossMareturnCodeStart
138
+ case -416: self = .sdkTimeout
137
139
  case -415: self = .sdkFetchDataFailed
138
140
  case -414: self = .sdkDecodeJsonFailed
139
141
  case -413: self = .sdkDecodeBase64Failed
@@ -231,6 +233,7 @@ public enum BlueReturnCode: SwiftProtobuf.Enum {
231
233
  switch self {
232
234
  case .ossMareturnCodeEnd: return -1100
233
235
  case .ossMareturnCodeStart: return -1000
236
+ case .sdkTimeout: return -416
234
237
  case .sdkFetchDataFailed: return -415
235
238
  case .sdkDecodeJsonFailed: return -414
236
239
  case .sdkDecodeBase64Failed: return -413
@@ -3536,6 +3539,7 @@ extension BlueReturnCode: SwiftProtobuf._ProtoNameProviding {
3536
3539
  public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
3537
3540
  -1100: .same(proto: "OssMAReturnCodeEnd"),
3538
3541
  -1000: .same(proto: "OssMAReturnCodeStart"),
3542
+ -416: .same(proto: "SdkTimeout"),
3539
3543
  -415: .same(proto: "SdkFetchDataFailed"),
3540
3544
  -414: .same(proto: "SdkDecodeJsonFailed"),
3541
3545
  -413: .same(proto: "SdkDecodeBase64Failed"),
@@ -1,7 +1,7 @@
1
1
  import Foundation
2
2
 
3
3
  public final class BlueError: Error, LocalizedError, Equatable {
4
- public static var timeoutMessage = "A timeout has occurred"
4
+ public static var timeoutMessage = "A timeout has occurred with return code %returnCode%"
5
5
  public static var returnCodeMessage = "Error with return code %returnCode%"
6
6
  public static var unknownErrorMessage = "Unknnown error has ocurred"
7
7
 
@@ -11,10 +11,11 @@ public final class BlueError: Error, LocalizedError, Equatable {
11
11
  private let detail: String?
12
12
 
13
13
  public var errorDescription: String? {
14
- if (returnCode == .timeout) {
15
- return BlueError.timeoutMessage
14
+ var returnCodeStr = "\(returnCode.rawValue) (\(String(describing: returnCode)))"
15
+
16
+ if (returnCode == .timeout || returnCode == .sdkTimeout) {
17
+ return BlueError.timeoutMessage.replacingOccurrences(of: "%returnCode%", with: returnCodeStr)
16
18
  } else {
17
- var returnCodeStr = "\(returnCode.rawValue) (\(String(describing: returnCode)))"
18
19
  if let cause = cause {
19
20
  returnCodeStr += "\nCause: \(cause.localizedDescription)"
20
21
  }
@@ -170,7 +170,7 @@ internal func blueNfc_Transceive(_ pCommandApdu: UnsafePointer<UInt8>, _ command
170
170
  let waitResponse = waitSemaphore.wait(timeout: DispatchTime.now() + 13.0)
171
171
 
172
172
  if waitResponse != .success {
173
- return blueAsClibReturnCode(.timeout)
173
+ return blueAsClibReturnCode(.sdkTimeout)
174
174
  }
175
175
 
176
176
  do {
@@ -36,7 +36,7 @@ internal func blueExecuteWithTimeout(_ handler: @escaping () throws -> Void, tim
36
36
  workItem.wait()
37
37
  } else {
38
38
  if workItem.wait(timeout: DispatchTime.now() + timeoutSeconds) == .timedOut {
39
- throw BlueError(.timeout)
39
+ throw BlueError(.sdkTimeout)
40
40
  }
41
41
  }
42
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blueid/access-capacitor",
3
- "version": "0.88.0",
3
+ "version": "0.89.0",
4
4
  "description": "Capacitor JS plugin for the BlueID Access SDK",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",