@blueid/access-capacitor 0.105.0 → 0.107.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.
Files changed (31) hide show
  1. package/dist/esm/BlueCore_pb.d.ts +4 -0
  2. package/dist/esm/BlueCore_pb.js +1 -0
  3. package/dist/esm/BlueCore_pb.js.map +1 -1
  4. package/dist/esm/BlueSDK_pb.d.ts +17 -13
  5. package/dist/esm/BlueSDK_pb.js +13 -12
  6. package/dist/esm/BlueSDK_pb.js.map +1 -1
  7. package/dist/esm/BlueSystem_pb.d.ts +12 -0
  8. package/dist/esm/BlueSystem_pb.js +3 -0
  9. package/dist/esm/BlueSystem_pb.js.map +1 -1
  10. package/dist/plugin.cjs.js +17 -12
  11. package/dist/plugin.cjs.js.map +1 -1
  12. package/dist/plugin.js +17 -12
  13. package/dist/plugin.js.map +1 -1
  14. package/ios/CBlueIDAccess.xcframework/Info.plist +6 -6
  15. package/ios/CBlueIDAccess.xcframework/ios-arm64/Headers/core/BlueCore.pb.h +7 -4
  16. package/ios/CBlueIDAccess.xcframework/ios-arm64/libCBlueIDAccess.a +0 -0
  17. package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/Headers/core/BlueCore.pb.h +7 -4
  18. package/ios/CBlueIDAccess.xcframework/ios-arm64_x86_64-simulator/libCBlueIDAccess.a +0 -0
  19. package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/Headers/core/BlueCore.pb.h +7 -4
  20. package/ios/CBlueIDAccess.xcframework/macos-arm64_x86_64/libCBlueIDAccess.a +0 -0
  21. package/ios/Plugin/BlueIDAccessSDK/BlueAPIProtocol.swift +9 -2
  22. package/ios/Plugin/BlueIDAccessSDK/BlueAccess.swift +1 -5
  23. package/ios/Plugin/BlueIDAccessSDK/BlueCommands.swift +1 -1
  24. package/ios/Plugin/BlueIDAccessSDK/BlueCore.pb.swift +17 -0
  25. package/ios/Plugin/BlueIDAccessSDK/BlueDFU/BlueUpdateAccessDeviceFirmwareCommand.swift +33 -7
  26. package/ios/Plugin/BlueIDAccessSDK/BlueModal/BlueStepProgressModalView.swift +32 -8
  27. package/ios/Plugin/BlueIDAccessSDK/BlueSDK.pb.swift +65 -47
  28. package/ios/Plugin/BlueIDAccessSDK/BlueSystem.pb.swift +51 -0
  29. package/ios/Plugin/BlueIDAccessSDK/BlueSystem.swift +46 -27
  30. package/ios/Plugin/BlueIDAccessSDK/BlueTaskRunner.swift +8 -2
  31. package/package.json +1 -1
@@ -26,7 +26,7 @@
26
26
  <key>HeadersPath</key>
27
27
  <string>Headers</string>
28
28
  <key>LibraryIdentifier</key>
29
- <string>ios-arm64_x86_64-simulator</string>
29
+ <string>macos-arm64_x86_64</string>
30
30
  <key>LibraryPath</key>
31
31
  <string>libCBlueIDAccess.a</string>
32
32
  <key>SupportedArchitectures</key>
@@ -35,9 +35,7 @@
35
35
  <string>x86_64</string>
36
36
  </array>
37
37
  <key>SupportedPlatform</key>
38
- <string>ios</string>
39
- <key>SupportedPlatformVariant</key>
40
- <string>simulator</string>
38
+ <string>macos</string>
41
39
  </dict>
42
40
  <dict>
43
41
  <key>BinaryPath</key>
@@ -45,7 +43,7 @@
45
43
  <key>HeadersPath</key>
46
44
  <string>Headers</string>
47
45
  <key>LibraryIdentifier</key>
48
- <string>macos-arm64_x86_64</string>
46
+ <string>ios-arm64_x86_64-simulator</string>
49
47
  <key>LibraryPath</key>
50
48
  <string>libCBlueIDAccess.a</string>
51
49
  <key>SupportedArchitectures</key>
@@ -54,7 +52,9 @@
54
52
  <string>x86_64</string>
55
53
  </array>
56
54
  <key>SupportedPlatform</key>
57
- <string>macos</string>
55
+ <string>ios</string>
56
+ <key>SupportedPlatformVariant</key>
57
+ <string>simulator</string>
58
58
  </dict>
59
59
  </array>
60
60
  <key>CFBundlePackageType</key>
@@ -289,6 +289,7 @@ typedef struct BlueSharedDemoData {
289
289
  typedef struct BlueVersionInfo {
290
290
  uint32_t buildTime;
291
291
  uint16_t version;
292
+ uint16_t testVersion;
292
293
  } BlueVersionInfo_t;
293
294
 
294
295
  typedef struct BlueLocalTimestamp {
@@ -864,7 +865,7 @@ extern "C" {
864
865
 
865
866
  /* Initializer values for message structs */
866
867
  #define BLUESHAREDDEMODATA_INIT_DEFAULT {"wa0y1YwS", {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xa5,0xab,0x6d,0x14,0x11,0x30,0x47,0xa7,0xad,0x6c,0x10,0xe4,0x4d,0xe6,0x3c,0x05,0xb9,0x6b,0x84,0xb5,0x1f,0xe3,0x14,0xd6,0x87,0x5c,0x46,0x9e,0xb9,0xcd,0x69,0x2b,0xa1,0x44,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xef,0x36,0x55,0xc9,0x4d,0x80,0x1e,0xf4,0x92,0x56,0x75,0x0e,0x70,0xe1,0x51,0x0e,0xcc,0xe8,0xb4,0x6c,0x54,0x5e,0x55,0x1d,0xde,0xbb,0xfc,0x6f,0x22,0xa8,0x49,0x50,0xa1,0x44,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}}
867
- #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0}
868
+ #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0, 0}
868
869
  #define BLUELOCALTIMESTAMP_INIT_DEFAULT {0, 0, 0, 0, 0, 0u}
869
870
  #define BLUELOCALTIMEPERIOD_INIT_DEFAULT {0, 0, 0, 0}
870
871
  #define BLUELOCALTIMESCHEDULE_INIT_DEFAULT {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_DEFAULT}
@@ -920,7 +921,7 @@ extern "C" {
920
921
  #define BLUEOSSSOSETTINGS_INIT_DEFAULT {false, BLUEOSSSOMIFAREDESFIRECONFIGURATION_INIT_DEFAULT}
921
922
  #define _BLUETESTENCODEDECODE_INIT_DEFAULT {"", "", 0, 0}
922
923
  #define BLUESHAREDDEMODATA_INIT_ZERO {"", {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}
923
- #define BLUEVERSIONINFO_INIT_ZERO {0, 0}
924
+ #define BLUEVERSIONINFO_INIT_ZERO {0, 0, 0}
924
925
  #define BLUELOCALTIMESTAMP_INIT_ZERO {0, 0, 0, 0, 0, 0}
925
926
  #define BLUELOCALTIMEPERIOD_INIT_ZERO {0, 0, 0, 0}
926
927
  #define BLUELOCALTIMESCHEDULE_INIT_ZERO {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_ZERO}
@@ -984,6 +985,7 @@ extern "C" {
984
985
  #define BLUESHAREDDEMODATA_SIGNATUREPUBLICKEY_TAG 5
985
986
  #define BLUEVERSIONINFO_BUILDTIME_TAG 1
986
987
  #define BLUEVERSIONINFO_VERSION_TAG 2
988
+ #define BLUEVERSIONINFO_TESTVERSION_TAG 3
987
989
  #define BLUELOCALTIMESTAMP_YEAR_TAG 1
988
990
  #define BLUELOCALTIMESTAMP_MONTH_TAG 2
989
991
  #define BLUELOCALTIMESTAMP_DATE_TAG 3
@@ -1177,7 +1179,8 @@ X(a, STATIC, REQUIRED, BYTES, signaturePublicKey, 5)
1177
1179
 
1178
1180
  #define BLUEVERSIONINFO_FIELDLIST(X, a) \
1179
1181
  X(a, STATIC, REQUIRED, UINT32, buildTime, 1) \
1180
- X(a, STATIC, REQUIRED, UINT32, version, 2)
1182
+ X(a, STATIC, REQUIRED, UINT32, version, 2) \
1183
+ X(a, STATIC, REQUIRED, UINT32, testVersion, 3)
1181
1184
  #define BLUEVERSIONINFO_CALLBACK NULL
1182
1185
  #define BLUEVERSIONINFO_DEFAULT NULL
1183
1186
 
@@ -1795,7 +1798,7 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1795
1798
  #define BLUESPRESULT_SIZE 1795
1796
1799
  #define BLUESPTOKENCOMMAND_SIZE 1861
1797
1800
  #define BLUESPTOKEN_SIZE 1940
1798
- #define BLUEVERSIONINFO_SIZE 10
1801
+ #define BLUEVERSIONINFO_SIZE 14
1799
1802
  #define _BLUETESTENCODEDECODE_SIZE 90
1800
1803
 
1801
1804
  #ifdef __cplusplus
@@ -289,6 +289,7 @@ typedef struct BlueSharedDemoData {
289
289
  typedef struct BlueVersionInfo {
290
290
  uint32_t buildTime;
291
291
  uint16_t version;
292
+ uint16_t testVersion;
292
293
  } BlueVersionInfo_t;
293
294
 
294
295
  typedef struct BlueLocalTimestamp {
@@ -864,7 +865,7 @@ extern "C" {
864
865
 
865
866
  /* Initializer values for message structs */
866
867
  #define BLUESHAREDDEMODATA_INIT_DEFAULT {"wa0y1YwS", {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xa5,0xab,0x6d,0x14,0x11,0x30,0x47,0xa7,0xad,0x6c,0x10,0xe4,0x4d,0xe6,0x3c,0x05,0xb9,0x6b,0x84,0xb5,0x1f,0xe3,0x14,0xd6,0x87,0x5c,0x46,0x9e,0xb9,0xcd,0x69,0x2b,0xa1,0x44,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xef,0x36,0x55,0xc9,0x4d,0x80,0x1e,0xf4,0x92,0x56,0x75,0x0e,0x70,0xe1,0x51,0x0e,0xcc,0xe8,0xb4,0x6c,0x54,0x5e,0x55,0x1d,0xde,0xbb,0xfc,0x6f,0x22,0xa8,0x49,0x50,0xa1,0x44,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}}
867
- #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0}
868
+ #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0, 0}
868
869
  #define BLUELOCALTIMESTAMP_INIT_DEFAULT {0, 0, 0, 0, 0, 0u}
869
870
  #define BLUELOCALTIMEPERIOD_INIT_DEFAULT {0, 0, 0, 0}
870
871
  #define BLUELOCALTIMESCHEDULE_INIT_DEFAULT {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_DEFAULT}
@@ -920,7 +921,7 @@ extern "C" {
920
921
  #define BLUEOSSSOSETTINGS_INIT_DEFAULT {false, BLUEOSSSOMIFAREDESFIRECONFIGURATION_INIT_DEFAULT}
921
922
  #define _BLUETESTENCODEDECODE_INIT_DEFAULT {"", "", 0, 0}
922
923
  #define BLUESHAREDDEMODATA_INIT_ZERO {"", {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}
923
- #define BLUEVERSIONINFO_INIT_ZERO {0, 0}
924
+ #define BLUEVERSIONINFO_INIT_ZERO {0, 0, 0}
924
925
  #define BLUELOCALTIMESTAMP_INIT_ZERO {0, 0, 0, 0, 0, 0}
925
926
  #define BLUELOCALTIMEPERIOD_INIT_ZERO {0, 0, 0, 0}
926
927
  #define BLUELOCALTIMESCHEDULE_INIT_ZERO {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_ZERO}
@@ -984,6 +985,7 @@ extern "C" {
984
985
  #define BLUESHAREDDEMODATA_SIGNATUREPUBLICKEY_TAG 5
985
986
  #define BLUEVERSIONINFO_BUILDTIME_TAG 1
986
987
  #define BLUEVERSIONINFO_VERSION_TAG 2
988
+ #define BLUEVERSIONINFO_TESTVERSION_TAG 3
987
989
  #define BLUELOCALTIMESTAMP_YEAR_TAG 1
988
990
  #define BLUELOCALTIMESTAMP_MONTH_TAG 2
989
991
  #define BLUELOCALTIMESTAMP_DATE_TAG 3
@@ -1177,7 +1179,8 @@ X(a, STATIC, REQUIRED, BYTES, signaturePublicKey, 5)
1177
1179
 
1178
1180
  #define BLUEVERSIONINFO_FIELDLIST(X, a) \
1179
1181
  X(a, STATIC, REQUIRED, UINT32, buildTime, 1) \
1180
- X(a, STATIC, REQUIRED, UINT32, version, 2)
1182
+ X(a, STATIC, REQUIRED, UINT32, version, 2) \
1183
+ X(a, STATIC, REQUIRED, UINT32, testVersion, 3)
1181
1184
  #define BLUEVERSIONINFO_CALLBACK NULL
1182
1185
  #define BLUEVERSIONINFO_DEFAULT NULL
1183
1186
 
@@ -1795,7 +1798,7 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1795
1798
  #define BLUESPRESULT_SIZE 1795
1796
1799
  #define BLUESPTOKENCOMMAND_SIZE 1861
1797
1800
  #define BLUESPTOKEN_SIZE 1940
1798
- #define BLUEVERSIONINFO_SIZE 10
1801
+ #define BLUEVERSIONINFO_SIZE 14
1799
1802
  #define _BLUETESTENCODEDECODE_SIZE 90
1800
1803
 
1801
1804
  #ifdef __cplusplus
@@ -289,6 +289,7 @@ typedef struct BlueSharedDemoData {
289
289
  typedef struct BlueVersionInfo {
290
290
  uint32_t buildTime;
291
291
  uint16_t version;
292
+ uint16_t testVersion;
292
293
  } BlueVersionInfo_t;
293
294
 
294
295
  typedef struct BlueLocalTimestamp {
@@ -864,7 +865,7 @@ extern "C" {
864
865
 
865
866
  /* Initializer values for message structs */
866
867
  #define BLUESHAREDDEMODATA_INIT_DEFAULT {"wa0y1YwS", {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xa5,0xab,0x6d,0x14,0x11,0x30,0x47,0xa7,0xad,0x6c,0x10,0xe4,0x4d,0xe6,0x3c,0x05,0xb9,0x6b,0x84,0xb5,0x1f,0xe3,0x14,0xd6,0x87,0x5c,0x46,0x9e,0xb9,0xcd,0x69,0x2b,0xa1,0x44,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x3a,0x66,0x86,0x75,0xc9,0x29,0x29,0x07,0xc3,0x63,0x18,0x97,0x4d,0xd9,0x44,0x1c,0x71,0xf9,0xe4,0x45,0xe8,0x74,0x1a,0x3f,0xaf,0x6b,0xc5,0x8c,0x9c,0x69,0x13,0xbe,0x44,0x14,0x0b,0x60,0x45,0x4f,0x76,0x2f,0xc2,0xf1,0x98,0x41,0x98,0xec,0x6e,0x39,0x1b,0x53,0x36,0x8b,0x90,0x73,0xea,0x1d,0xe7,0x20,0xcf,0xa1,0xbe,0x2d,0xd4,0xf1}}, {138, {0x30,0x81,0x87,0x02,0x01,0x00,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x04,0x6d,0x30,0x6b,0x02,0x01,0x01,0x04,0x20,0xef,0x36,0x55,0xc9,0x4d,0x80,0x1e,0xf4,0x92,0x56,0x75,0x0e,0x70,0xe1,0x51,0x0e,0xcc,0xe8,0xb4,0x6c,0x54,0x5e,0x55,0x1d,0xde,0xbb,0xfc,0x6f,0x22,0xa8,0x49,0x50,0xa1,0x44,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}, {91, {0x30,0x59,0x30,0x13,0x06,0x07,0x2a,0x86,0x48,0xce,0x3d,0x02,0x01,0x06,0x08,0x2a,0x86,0x48,0xce,0x3d,0x03,0x01,0x07,0x03,0x42,0x00,0x04,0x5a,0x0d,0x6e,0x67,0x45,0xcc,0xd5,0xc1,0x8c,0xeb,0xd8,0xaf,0xf6,0xea,0x86,0xd8,0xc3,0xaf,0x43,0x3f,0xb7,0xa2,0xd2,0x5f,0x21,0x34,0x42,0xd4,0xcd,0x96,0x83,0xb4,0xe6,0x7d,0x2d,0xdc,0x25,0xeb,0x53,0xf9,0x12,0x76,0x1e,0x40,0xe6,0xc9,0x99,0x83,0xdd,0x90,0x90,0xfe,0xf0,0xb4,0x25,0x99,0xcd,0x16,0xae,0x39,0x2f,0xcf,0x96,0x43}}}
867
- #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0}
868
+ #define BLUEVERSIONINFO_INIT_DEFAULT {0, 0, 0}
868
869
  #define BLUELOCALTIMESTAMP_INIT_DEFAULT {0, 0, 0, 0, 0, 0u}
869
870
  #define BLUELOCALTIMEPERIOD_INIT_DEFAULT {0, 0, 0, 0}
870
871
  #define BLUELOCALTIMESCHEDULE_INIT_DEFAULT {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_DEFAULT}
@@ -920,7 +921,7 @@ extern "C" {
920
921
  #define BLUEOSSSOSETTINGS_INIT_DEFAULT {false, BLUEOSSSOMIFAREDESFIRECONFIGURATION_INIT_DEFAULT}
921
922
  #define _BLUETESTENCODEDECODE_INIT_DEFAULT {"", "", 0, 0}
922
923
  #define BLUESHAREDDEMODATA_INIT_ZERO {"", {0, {0}}, {0, {0}}, {0, {0}}, {0, {0}}}
923
- #define BLUEVERSIONINFO_INIT_ZERO {0, 0}
924
+ #define BLUEVERSIONINFO_INIT_ZERO {0, 0, 0}
924
925
  #define BLUELOCALTIMESTAMP_INIT_ZERO {0, 0, 0, 0, 0, 0}
925
926
  #define BLUELOCALTIMEPERIOD_INIT_ZERO {0, 0, 0, 0}
926
927
  #define BLUELOCALTIMESCHEDULE_INIT_ZERO {0, 0, 0, {0, 0, 0, 0, 0, 0, 0}, BLUELOCALTIMEPERIOD_INIT_ZERO}
@@ -984,6 +985,7 @@ extern "C" {
984
985
  #define BLUESHAREDDEMODATA_SIGNATUREPUBLICKEY_TAG 5
985
986
  #define BLUEVERSIONINFO_BUILDTIME_TAG 1
986
987
  #define BLUEVERSIONINFO_VERSION_TAG 2
988
+ #define BLUEVERSIONINFO_TESTVERSION_TAG 3
987
989
  #define BLUELOCALTIMESTAMP_YEAR_TAG 1
988
990
  #define BLUELOCALTIMESTAMP_MONTH_TAG 2
989
991
  #define BLUELOCALTIMESTAMP_DATE_TAG 3
@@ -1177,7 +1179,8 @@ X(a, STATIC, REQUIRED, BYTES, signaturePublicKey, 5)
1177
1179
 
1178
1180
  #define BLUEVERSIONINFO_FIELDLIST(X, a) \
1179
1181
  X(a, STATIC, REQUIRED, UINT32, buildTime, 1) \
1180
- X(a, STATIC, REQUIRED, UINT32, version, 2)
1182
+ X(a, STATIC, REQUIRED, UINT32, version, 2) \
1183
+ X(a, STATIC, REQUIRED, UINT32, testVersion, 3)
1181
1184
  #define BLUEVERSIONINFO_CALLBACK NULL
1182
1185
  #define BLUEVERSIONINFO_DEFAULT NULL
1183
1186
 
@@ -1795,7 +1798,7 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1795
1798
  #define BLUESPRESULT_SIZE 1795
1796
1799
  #define BLUESPTOKENCOMMAND_SIZE 1861
1797
1800
  #define BLUESPTOKEN_SIZE 1940
1798
- #define BLUEVERSIONINFO_SIZE 10
1801
+ #define BLUEVERSIONINFO_SIZE 14
1799
1802
  #define _BLUETESTENCODEDECODE_SIZE 90
1800
1803
 
1801
1804
  #ifdef __cplusplus
@@ -242,10 +242,17 @@ internal struct BlueGetLatestFirmwareRequest: Encodable {
242
242
  var deviceId: String
243
243
  var tokenAuthentication: BlueTokenAuthentication
244
244
  }
245
+
246
+ internal struct BlueLatestFirmwareInfo: Decodable {
247
+ let version: Int
248
+ let testVersion: Int?
249
+ let url: String
250
+ }
251
+
245
252
  /// [POST] /access/getLatestFirmware response
246
253
  internal struct BlueGetLatestFirmwareResult: Decodable {
247
- var version: Int
248
- var url: String
254
+ let production: BlueLatestFirmwareInfo?
255
+ let test: BlueLatestFirmwareInfo?
249
256
  }
250
257
 
251
258
  protocol BlueAPIProtocol {
@@ -329,11 +329,7 @@ public class BlueSynchronizeAccessDeviceCommand: BlueSdkAsyncCommand {
329
329
 
330
330
  private func getSystemStatus(_ deviceID: String) async throws -> BlueSystemStatus {
331
331
  do {
332
- return try await blueTerminalRun(
333
- deviceID: deviceID,
334
- timeoutSeconds: 30.0,
335
- action: "STATUS"
336
- )
332
+ return try await BlueGetSystemStatusCommand(sdkService).runAsync(deviceID: deviceID)
337
333
  } catch {
338
334
  throw BlueError(.sdkGetSystemStatusFailed, cause: error)
339
335
  }
@@ -89,7 +89,7 @@ public struct BlueCommands {
89
89
  public let clearBlacklist = BlueClearBlacklistCommand()
90
90
  public let clearEventLog = BlueClearEventLogCommand()
91
91
  public let clearSystemLog = BlueClearSystemLogCommand()
92
- public let getSystemStatus = BlueGetSystemStatusCommand()
92
+ public let getSystemStatus = BlueGetSystemStatusCommand(defaultSdkService)
93
93
 
94
94
  public let openAppSettings = BlueOpenAppSettingsCommand()
95
95
 
@@ -1165,12 +1165,22 @@ public struct BlueVersionInfo {
1165
1165
  /// Clears the value of `version`. Subsequent reads from it will return its default value.
1166
1166
  public mutating func clearVersion() {self._version = nil}
1167
1167
 
1168
+ public var testVersion: UInt32 {
1169
+ get {return _testVersion ?? 0}
1170
+ set {_testVersion = newValue}
1171
+ }
1172
+ /// Returns true if `testVersion` has been explicitly set.
1173
+ public var hasTestVersion: Bool {return self._testVersion != nil}
1174
+ /// Clears the value of `testVersion`. Subsequent reads from it will return its default value.
1175
+ public mutating func clearTestVersion() {self._testVersion = nil}
1176
+
1168
1177
  public var unknownFields = SwiftProtobuf.UnknownStorage()
1169
1178
 
1170
1179
  public init() {}
1171
1180
 
1172
1181
  fileprivate var _buildTime: UInt32? = nil
1173
1182
  fileprivate var _version: UInt32? = nil
1183
+ fileprivate var _testVersion: UInt32? = nil
1174
1184
  }
1175
1185
 
1176
1186
  public struct BlueLocalTimestamp {
@@ -3980,11 +3990,13 @@ extension BlueVersionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
3980
3990
  public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
3981
3991
  1: .same(proto: "buildTime"),
3982
3992
  2: .same(proto: "version"),
3993
+ 3: .same(proto: "testVersion"),
3983
3994
  ]
3984
3995
 
3985
3996
  public var isInitialized: Bool {
3986
3997
  if self._buildTime == nil {return false}
3987
3998
  if self._version == nil {return false}
3999
+ if self._testVersion == nil {return false}
3988
4000
  return true
3989
4001
  }
3990
4002
 
@@ -3996,6 +4008,7 @@ extension BlueVersionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
3996
4008
  switch fieldNumber {
3997
4009
  case 1: try { try decoder.decodeSingularUInt32Field(value: &self._buildTime) }()
3998
4010
  case 2: try { try decoder.decodeSingularUInt32Field(value: &self._version) }()
4011
+ case 3: try { try decoder.decodeSingularUInt32Field(value: &self._testVersion) }()
3999
4012
  default: break
4000
4013
  }
4001
4014
  }
@@ -4012,12 +4025,16 @@ extension BlueVersionInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplemen
4012
4025
  try { if let v = self._version {
4013
4026
  try visitor.visitSingularUInt32Field(value: v, fieldNumber: 2)
4014
4027
  } }()
4028
+ try { if let v = self._testVersion {
4029
+ try visitor.visitSingularUInt32Field(value: v, fieldNumber: 3)
4030
+ } }()
4015
4031
  try unknownFields.traverse(visitor: &visitor)
4016
4032
  }
4017
4033
 
4018
4034
  public static func ==(lhs: BlueVersionInfo, rhs: BlueVersionInfo) -> Bool {
4019
4035
  if lhs._buildTime != rhs._buildTime {return false}
4020
4036
  if lhs._version != rhs._version {return false}
4037
+ if lhs._testVersion != rhs._testVersion {return false}
4021
4038
  if lhs.unknownFields != rhs.unknownFields {return false}
4022
4039
  return true
4023
4040
  }
@@ -10,11 +10,12 @@ public class BlueUpdateAccessDeviceFirmwareCommand: BlueSdkAsyncCommand {
10
10
  override func runAsync(arg0: Any?, arg1: Any?, arg2: Any?) async throws -> Any? {
11
11
  return try await runAsync(
12
12
  credentialID: blueCastArg(String.self, arg0),
13
- deviceID: blueCastArg(String.self, arg1)
13
+ deviceID: blueCastArg(String.self, arg1),
14
+ testVersion: blueCastArg(Bool.self, arg2)
14
15
  )
15
16
  }
16
17
 
17
- public func runAsync(credentialID: String, deviceID: String) async throws {
18
+ public func runAsync(credentialID: String, deviceID: String, testVersion: Bool? = false) async throws {
18
19
  guard let credential = blueGetAccessCredential(credentialID: credentialID) else {
19
20
  throw BlueError(.sdkCredentialNotFound)
20
21
  }
@@ -24,7 +25,7 @@ public class BlueUpdateAccessDeviceFirmwareCommand: BlueSdkAsyncCommand {
24
25
  }
25
26
 
26
27
  try await BlueUpdateAccessDeviceFirmware(sdkService)
27
- .update(credential, deviceID)
28
+ .update(credential, deviceID, testVersion)
28
29
  }
29
30
  }
30
31
 
@@ -51,7 +52,7 @@ internal class BlueUpdateAccessDeviceFirmware: LoggerDelegate, DFUServiceDelegat
51
52
  self.sdkService = sdkService
52
53
  }
53
54
 
54
- public func update(_ credential: BlueAccessCredential, _ deviceID: String) async throws {
55
+ public func update(_ credential: BlueAccessCredential, _ deviceID: String, _ testVersion: Bool? = false) async throws {
55
56
 
56
57
  let tasks = [
57
58
  BlueTask(
@@ -73,10 +74,18 @@ internal class BlueUpdateAccessDeviceFirmware: LoggerDelegate, DFUServiceDelegat
73
74
  BlueTask(
74
75
  id: BlueUpdateAccessDeviceFirmwareTaskId.downloadLatestFirmware,
75
76
  label: blueI18n.dfuDownloadLatestFwlabel
76
- ) { _, runner in
77
+ ) { task, runner in
77
78
  let latestFW: BlueGetLatestFirmwareResult = try runner.getResult(BlueUpdateAccessDeviceFirmwareTaskId.checkLatestFirmware)
78
79
 
79
- return .result(try await self.downloadLatestFirmware(url: latestFW.url))
80
+ task.updateLabel("\(blueI18n.dfuDownloadLatestFwlabel) (\(self.getFirmwareVersion(latestFW, testVersion)))")
81
+
82
+ let url = testVersion == true ? latestFW.test?.url : latestFW.production?.url
83
+
84
+ guard let url = url else {
85
+ throw BlueError(.sdkInvalidFirmwareURL, detail: "NULL")
86
+ }
87
+
88
+ return .result(try await self.downloadLatestFirmware(url: url))
80
89
  },
81
90
 
82
91
  BlueTask(
@@ -97,7 +106,7 @@ internal class BlueUpdateAccessDeviceFirmware: LoggerDelegate, DFUServiceDelegat
97
106
 
98
107
  BlueTask(
99
108
  id: BlueUpdateAccessDeviceFirmwareTaskId.findDFUPeripheral,
100
- label: blueI18n.dfuFindDfuperipheralLabel
109
+ label: blueI18n.dfuInitializationLabel
101
110
  ) { _, _ in
102
111
  return .result(try await self.findPeripheral())
103
112
  },
@@ -110,9 +119,12 @@ internal class BlueUpdateAccessDeviceFirmware: LoggerDelegate, DFUServiceDelegat
110
119
  _ = self.controller?.abort()
111
120
  },
112
121
  handler: { task, runner in
122
+ let latestFW: BlueGetLatestFirmwareResult = try runner.getResult(BlueUpdateAccessDeviceFirmwareTaskId.checkLatestFirmware)
113
123
  let urlToZipFile: URL = try runner.getResult(BlueUpdateAccessDeviceFirmwareTaskId.prepareUpdate)
114
124
  let peripheral: CBPeripheral = try runner.getResult(BlueUpdateAccessDeviceFirmwareTaskId.findDFUPeripheral)
115
125
 
126
+ task.updateLabel("\(blueI18n.dfuUpdateFwlabel) (\(self.getFirmwareVersion(latestFW, testVersion)))")
127
+
116
128
  self.task = task
117
129
 
118
130
  return .result(try self.update(peripheral, urlToZipFile))
@@ -136,6 +148,20 @@ internal class BlueUpdateAccessDeviceFirmware: LoggerDelegate, DFUServiceDelegat
136
148
  #endif
137
149
  }
138
150
 
151
+ private func getFirmwareVersion(_ latestFW: BlueGetLatestFirmwareResult, _ testVersion: Bool? = false) -> String {
152
+ if testVersion == true {
153
+ if let testFW = latestFW.test {
154
+ if let minor = testFW.testVersion {
155
+ return "\(minor)"
156
+ }
157
+ }
158
+ } else if let prodFW = latestFW.production {
159
+ return "\(prodFW.version)"
160
+ }
161
+
162
+ return "?"
163
+ }
164
+
139
165
  private func downloadLatestFirmware(url string: String) async throws -> Data {
140
166
  guard let url = URL(string: string) else {
141
167
  throw BlueError(.sdkInvalidFirmwareURL)
@@ -49,11 +49,12 @@ class BlueTaskModel: ObservableObject, Identifiable {
49
49
  @Published var errorDescription: String
50
50
  @Published var isLast: Bool
51
51
 
52
+ private var labelSubscriber: AnyCancellable?
52
53
  private var statusSubscriber: AnyCancellable?
53
54
  private var progressSubscriber: AnyCancellable?
54
55
 
55
56
  init(_ task: BlueTask, _ isLast: Bool) {
56
- self.label = task.label
57
+ self.label = task.label.value
57
58
  self.status = task.status.value
58
59
  self.progress = task.progress?.value
59
60
  self.textColor = getTextColor(task.status.value)
@@ -80,6 +81,13 @@ class BlueTaskModel: ObservableObject, Identifiable {
80
81
  self.progress = progress
81
82
  self.objectWillChange.send()
82
83
  }
84
+
85
+ self.labelSubscriber = task.label.sink{ [weak self] label in
86
+ guard let self = self else { return }
87
+
88
+ self.label = label
89
+ self.objectWillChange.send()
90
+ }
83
91
  }
84
92
  }
85
93
 
@@ -108,11 +116,12 @@ struct TaskView: View {
108
116
 
109
117
  HStack(alignment: .center, spacing: 0) {
110
118
  ZStack(alignment: .leading) {
111
- Rectangle()
112
- .fill(task.statusColor)
113
- .frame(width: 2)
114
- .padding(.horizontal, 10.5)
115
- .hidden(task.isLast)
119
+ if (!task.isLast) {
120
+ Rectangle()
121
+ .fill(task.statusColor)
122
+ .frame(width: 2)
123
+ .padding(.horizontal, 10.5)
124
+ }
116
125
 
117
126
  if !task.errorDescription.isEmpty {
118
127
  Text(task.errorDescription)
@@ -152,7 +161,7 @@ class BlueStepProgressModalViewModel: ObservableObject {
152
161
  struct BlueStepProgressModalView: View {
153
162
  @ObservedObject private var vm: BlueStepProgressModalViewModel
154
163
 
155
- internal var height: CGFloat = 550
164
+ internal var height: CGFloat = 570
156
165
  internal var backgroundColor: UIColor = .white
157
166
  internal var foregroundColor: UIColor = .black
158
167
 
@@ -230,7 +239,7 @@ struct BlueStepProgressModalView: View {
230
239
 
231
240
  let noop: (BlueTask, BlueSerialTaskRunner) async throws -> BlueTaskResult = { _, _ in .result(nil) }
232
241
 
233
- struct BlueSynchronizeAccessDeviceModalView_Preview: PreviewProvider {
242
+ struct BlueStepProgressModalView_Preview: PreviewProvider {
234
243
  static var previews: some View {
235
244
  BlueStepProgressModalView(
236
245
  BlueStepProgressModalViewModel(
@@ -264,6 +273,21 @@ struct BlueSynchronizeAccessDeviceModalView_Preview: PreviewProvider {
264
273
  }
265
274
  )
266
275
  ) {}
276
+
277
+ BlueStepProgressModalView(
278
+ BlueStepProgressModalViewModel(
279
+ title: "DFU",
280
+ dismiss: "Cancel",
281
+ tasks: Array(1..<7).enumerated().map { (index, element) in
282
+ BlueTask(
283
+ id: element.description,
284
+ label: "Task label - \(element.description)",
285
+ status: .ready,
286
+ handler: noop
287
+ )
288
+ }
289
+ )
290
+ ) {}
267
291
  }
268
292
  }
269
293
  #endif