@blueid/access-capacitor 0.88.0 → 0.90.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>
@@ -26,16 +29,15 @@
26
29
  <key>HeadersPath</key>
27
30
  <string>Headers</string>
28
31
  <key>LibraryIdentifier</key>
29
- <string>macos-arm64_x86_64</string>
32
+ <string>ios-arm64</string>
30
33
  <key>LibraryPath</key>
31
34
  <string>libCBlueIDAccess.a</string>
32
35
  <key>SupportedArchitectures</key>
33
36
  <array>
34
37
  <string>arm64</string>
35
- <string>x86_64</string>
36
38
  </array>
37
39
  <key>SupportedPlatform</key>
38
- <string>macos</string>
40
+ <string>ios</string>
39
41
  </dict>
40
42
  <dict>
41
43
  <key>BinaryPath</key>
@@ -43,7 +45,7 @@
43
45
  <key>HeadersPath</key>
44
46
  <string>Headers</string>
45
47
  <key>LibraryIdentifier</key>
46
- <string>ios-arm64_x86_64-simulator</string>
48
+ <string>macos-arm64_x86_64</string>
47
49
  <key>LibraryPath</key>
48
50
  <string>libCBlueIDAccess.a</string>
49
51
  <key>SupportedArchitectures</key>
@@ -52,9 +54,7 @@
52
54
  <string>x86_64</string>
53
55
  </array>
54
56
  <key>SupportedPlatform</key>
55
- <string>ios</string>
56
- <key>SupportedPlatformVariant</key>
57
- <string>simulator</string>
57
+ <string>macos</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;
@@ -115,7 +116,7 @@ typedef enum BlueTimeUnit {
115
116
  BlueTimeUnit_Days = 4,
116
117
  BlueTimeUnit_Months = 5,
117
118
  BlueTimeUnit_Years = 6
118
- } BlueTimeUnit_t;
119
+ } pb_packed BlueTimeUnit_t;
119
120
 
120
121
  /* Those may never be changed */
121
122
  typedef enum BlueWeekday {
@@ -126,7 +127,7 @@ typedef enum BlueWeekday {
126
127
  BlueWeekday_Friday = 4,
127
128
  BlueWeekday_Saturday = 5,
128
129
  BlueWeekday_Sunday = 6
129
- } BlueWeekday_t;
130
+ } pb_packed BlueWeekday_t;
130
131
 
131
132
  typedef enum BlueCredentialType {
132
133
  /* Regular credential can only open / enter */
@@ -137,7 +138,7 @@ typedef enum BlueCredentialType {
137
138
  BlueCredentialType_Master = 3,
138
139
  /* Nfc writer allows to write any credential within this site on cards & fobs */
139
140
  BlueCredentialType_NfcWriter = 4
140
- } BlueCredentialType_t;
141
+ } pb_packed BlueCredentialType_t;
141
142
 
142
143
  typedef enum BlueAccessType {
143
144
  /* Access with default unlock time */
@@ -156,13 +157,13 @@ typedef enum BlueAccessType {
156
157
  BlueAccessType_NoAccessValidity = 7,
157
158
  /* No access due blacklisted */
158
159
  BlueAccessType_NoAccessBlacklisted = 8
159
- } BlueAccessType_t;
160
+ } pb_packed BlueAccessType_t;
160
161
 
161
162
  typedef enum BlueTransponderType {
162
163
  BlueTransponderType_UnknownTransponder = 0,
163
164
  BlueTransponderType_MobileTransponder = 1,
164
165
  BlueTransponderType_MifareDesfire = 2
165
- } BlueTransponderType_t;
166
+ } pb_packed BlueTransponderType_t;
166
167
 
167
168
  typedef enum BlueHardwareType {
168
169
  BlueHardwareType_UnknownHardware = 0,
@@ -172,7 +173,7 @@ typedef enum BlueHardwareType {
172
173
  BlueHardwareType_DoorHandleLock = 4,
173
174
  BlueHardwareType_WallReader = 5,
174
175
  BlueHardwareType_Kiosk = 6
175
- } BlueHardwareType_t;
176
+ } pb_packed BlueHardwareType_t;
176
177
 
177
178
  typedef enum BlueBatteryLevel {
178
179
  BlueBatteryLevel_UnknownBattery = 0,
@@ -184,9 +185,9 @@ typedef enum BlueBatteryLevel {
184
185
  /* 0% (100) - 100% (200) */
185
186
  BlueBatteryLevel_FullyDischarged = 100,
186
187
  BlueBatteryLevel_FullyCharged = 200
187
- } BlueBatteryLevel_t;
188
+ } pb_packed BlueBatteryLevel_t;
188
189
 
189
- typedef enum BlueEventId { /* Oss So events -- */
190
+ typedef enum BlueEventId {
190
191
  /* * eventInfo = 0 */
191
192
  BlueEventId_BatteryLow = 1,
192
193
  /* * eventInfo = 0 */
@@ -216,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
216
217
  BlueEventId_TerminalCommand = 14,
217
218
  /* * eventInfo = BlueReturnCode */
218
219
  BlueEventId_TerminalOss = 15
219
- } BlueEventId_t;
220
+ } pb_packed BlueEventId_t;
220
221
 
221
- typedef enum BlueEventInfoSystem { /* Oss So events -- */
222
+ typedef enum BlueEventInfoSystem {
222
223
  BlueEventInfoSystem_SystemRestart = 1,
223
224
  BlueEventInfoSystem_SystemConfigured = 2
224
- } BlueEventInfoSystem_t;
225
+ } pb_packed BlueEventInfoSystem_t;
225
226
 
226
- typedef enum BlueEventInfoAccess { /* Oss So events -- */
227
+ typedef enum BlueEventInfoAccess {
227
228
  BlueEventInfoAccess_Granted = 1,
228
229
  BlueEventInfoAccess_GrantedDefaultTime = 2,
229
230
  BlueEventInfoAccess_GrantedExtendedTime = 3,
@@ -233,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
233
234
  BlueEventInfoAccess_DeniedBlacklisted = 130,
234
235
  BlueEventInfoAccess_DeniedValidity = 131,
235
236
  BlueEventInfoAccess_DeniedDTSchedule = 132
236
- } BlueEventInfoAccess_t;
237
+ } pb_packed BlueEventInfoAccess_t;
237
238
 
238
239
  typedef enum BlueOssCredentialTypeSource {
239
240
  BlueOssCredentialTypeSource_Oss = 0,
240
241
  BlueOssCredentialTypeSource_Proprietary = 1
241
- } BlueOssCredentialTypeSource_t;
242
+ } pb_packed BlueOssCredentialTypeSource_t;
242
243
 
243
244
  typedef enum BlueOssSoCredentialTypeOssCredential {
244
245
  BlueOssSoCredentialTypeOssCredential_Standard = 0,
245
246
  BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
246
- } BlueOssSoCredentialTypeOssCredential_t;
247
+ } pb_packed BlueOssSoCredentialTypeOssCredential_t;
247
248
 
248
249
  typedef enum BlueOssSoDoorInfoAccessBy {
249
250
  BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
250
251
  BlueOssSoDoorInfoAccessBy_DoorId = 1
251
- } BlueOssSoDoorInfoAccessBy_t;
252
+ } pb_packed BlueOssSoDoorInfoAccessBy_t;
252
253
 
253
254
  typedef enum BlueOssSoFileId {
254
255
  BlueOssSoFileId_Info = 0,
@@ -256,7 +257,7 @@ typedef enum BlueOssSoFileId {
256
257
  BlueOssSoFileId_Event = 2,
257
258
  BlueOssSoFileId_Blacklist = 3,
258
259
  BlueOssSoFileId_CustomerExtensions = 4
259
- } BlueOssSoFileId_t;
260
+ } pb_packed BlueOssSoFileId_t;
260
261
 
261
262
  /* Struct definitions */
262
263
  typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
@@ -508,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
508
509
  } BlueOssSoDTSchedule_t;
509
510
 
510
511
  typedef struct BlueOssSoDoorInfo {
511
- uint32_t id;
512
+ uint16_t id;
512
513
  BlueOssSoDoorInfoAccessBy_t accessBy;
513
- uint32_t dtScheduleNumber;
514
+ uint8_t dtScheduleNumber;
514
515
  BlueAccessType_t accessType;
515
516
  } BlueOssSoDoorInfo_t;
516
517
 
517
518
  typedef struct BlueOssSoEvent {
518
519
  BlueLocalTimestamp_t eventTime;
519
- uint32_t doorId;
520
+ uint16_t doorId;
520
521
  BlueEventId_t eventId;
521
522
  /* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
522
523
  If eventId = SystemEvent -> BlueEventInfoSystem
523
524
  Otherwise unused */
524
- uint32_t eventInfo;
525
+ uint8_t eventInfo;
525
526
  } BlueOssSoEvent_t;
526
527
 
527
528
  typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
@@ -1713,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1713
1714
  #define BLUEOSSSIDSETTINGS_SIZE 62
1714
1715
  #define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
1715
1716
  #define BLUEOSSSIDVERSION_SIZE 12
1716
- #define BLUEOSSSOCONFIGURATION_SIZE 28568
1717
+ #define BLUEOSSSOCONFIGURATION_SIZE 26018
1717
1718
  #define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
1718
1719
  #define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
1719
1720
  #define BLUEOSSSOCREDENTIALTYPE_SIZE 17
1720
- #define BLUEOSSSODOORINFO_SIZE 16
1721
+ #define BLUEOSSSODOORINFO_SIZE 11
1721
1722
  #define BLUEOSSSODTSCHEDULEDAY_SIZE 70
1722
1723
  #define BLUEOSSSODTSCHEDULE_SIZE 288
1723
- #define BLUEOSSSOEVENT_SIZE 35
1724
+ #define BLUEOSSSOEVENT_SIZE 30
1724
1725
  #define BLUEOSSSOEXTFEATURE_SIZE 72
1725
1726
  #define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
1726
1727
  #define BLUEOSSSOFILEBLACKLIST_SIZE 9435
1727
1728
  #define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
1728
- #define BLUEOSSSOFILEDATA_SIZE 8996
1729
- #define BLUEOSSSOFILEEVENT_SIZE 9449
1729
+ #define BLUEOSSSOFILEDATA_SIZE 7721
1730
+ #define BLUEOSSSOFILEEVENT_SIZE 8174
1730
1731
  #define BLUEOSSSOFILEINFO_SIZE 57
1731
1732
  #define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
1732
1733
  #define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
@@ -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;
@@ -115,7 +116,7 @@ typedef enum BlueTimeUnit {
115
116
  BlueTimeUnit_Days = 4,
116
117
  BlueTimeUnit_Months = 5,
117
118
  BlueTimeUnit_Years = 6
118
- } BlueTimeUnit_t;
119
+ } pb_packed BlueTimeUnit_t;
119
120
 
120
121
  /* Those may never be changed */
121
122
  typedef enum BlueWeekday {
@@ -126,7 +127,7 @@ typedef enum BlueWeekday {
126
127
  BlueWeekday_Friday = 4,
127
128
  BlueWeekday_Saturday = 5,
128
129
  BlueWeekday_Sunday = 6
129
- } BlueWeekday_t;
130
+ } pb_packed BlueWeekday_t;
130
131
 
131
132
  typedef enum BlueCredentialType {
132
133
  /* Regular credential can only open / enter */
@@ -137,7 +138,7 @@ typedef enum BlueCredentialType {
137
138
  BlueCredentialType_Master = 3,
138
139
  /* Nfc writer allows to write any credential within this site on cards & fobs */
139
140
  BlueCredentialType_NfcWriter = 4
140
- } BlueCredentialType_t;
141
+ } pb_packed BlueCredentialType_t;
141
142
 
142
143
  typedef enum BlueAccessType {
143
144
  /* Access with default unlock time */
@@ -156,13 +157,13 @@ typedef enum BlueAccessType {
156
157
  BlueAccessType_NoAccessValidity = 7,
157
158
  /* No access due blacklisted */
158
159
  BlueAccessType_NoAccessBlacklisted = 8
159
- } BlueAccessType_t;
160
+ } pb_packed BlueAccessType_t;
160
161
 
161
162
  typedef enum BlueTransponderType {
162
163
  BlueTransponderType_UnknownTransponder = 0,
163
164
  BlueTransponderType_MobileTransponder = 1,
164
165
  BlueTransponderType_MifareDesfire = 2
165
- } BlueTransponderType_t;
166
+ } pb_packed BlueTransponderType_t;
166
167
 
167
168
  typedef enum BlueHardwareType {
168
169
  BlueHardwareType_UnknownHardware = 0,
@@ -172,7 +173,7 @@ typedef enum BlueHardwareType {
172
173
  BlueHardwareType_DoorHandleLock = 4,
173
174
  BlueHardwareType_WallReader = 5,
174
175
  BlueHardwareType_Kiosk = 6
175
- } BlueHardwareType_t;
176
+ } pb_packed BlueHardwareType_t;
176
177
 
177
178
  typedef enum BlueBatteryLevel {
178
179
  BlueBatteryLevel_UnknownBattery = 0,
@@ -184,9 +185,9 @@ typedef enum BlueBatteryLevel {
184
185
  /* 0% (100) - 100% (200) */
185
186
  BlueBatteryLevel_FullyDischarged = 100,
186
187
  BlueBatteryLevel_FullyCharged = 200
187
- } BlueBatteryLevel_t;
188
+ } pb_packed BlueBatteryLevel_t;
188
189
 
189
- typedef enum BlueEventId { /* Oss So events -- */
190
+ typedef enum BlueEventId {
190
191
  /* * eventInfo = 0 */
191
192
  BlueEventId_BatteryLow = 1,
192
193
  /* * eventInfo = 0 */
@@ -216,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
216
217
  BlueEventId_TerminalCommand = 14,
217
218
  /* * eventInfo = BlueReturnCode */
218
219
  BlueEventId_TerminalOss = 15
219
- } BlueEventId_t;
220
+ } pb_packed BlueEventId_t;
220
221
 
221
- typedef enum BlueEventInfoSystem { /* Oss So events -- */
222
+ typedef enum BlueEventInfoSystem {
222
223
  BlueEventInfoSystem_SystemRestart = 1,
223
224
  BlueEventInfoSystem_SystemConfigured = 2
224
- } BlueEventInfoSystem_t;
225
+ } pb_packed BlueEventInfoSystem_t;
225
226
 
226
- typedef enum BlueEventInfoAccess { /* Oss So events -- */
227
+ typedef enum BlueEventInfoAccess {
227
228
  BlueEventInfoAccess_Granted = 1,
228
229
  BlueEventInfoAccess_GrantedDefaultTime = 2,
229
230
  BlueEventInfoAccess_GrantedExtendedTime = 3,
@@ -233,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
233
234
  BlueEventInfoAccess_DeniedBlacklisted = 130,
234
235
  BlueEventInfoAccess_DeniedValidity = 131,
235
236
  BlueEventInfoAccess_DeniedDTSchedule = 132
236
- } BlueEventInfoAccess_t;
237
+ } pb_packed BlueEventInfoAccess_t;
237
238
 
238
239
  typedef enum BlueOssCredentialTypeSource {
239
240
  BlueOssCredentialTypeSource_Oss = 0,
240
241
  BlueOssCredentialTypeSource_Proprietary = 1
241
- } BlueOssCredentialTypeSource_t;
242
+ } pb_packed BlueOssCredentialTypeSource_t;
242
243
 
243
244
  typedef enum BlueOssSoCredentialTypeOssCredential {
244
245
  BlueOssSoCredentialTypeOssCredential_Standard = 0,
245
246
  BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
246
- } BlueOssSoCredentialTypeOssCredential_t;
247
+ } pb_packed BlueOssSoCredentialTypeOssCredential_t;
247
248
 
248
249
  typedef enum BlueOssSoDoorInfoAccessBy {
249
250
  BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
250
251
  BlueOssSoDoorInfoAccessBy_DoorId = 1
251
- } BlueOssSoDoorInfoAccessBy_t;
252
+ } pb_packed BlueOssSoDoorInfoAccessBy_t;
252
253
 
253
254
  typedef enum BlueOssSoFileId {
254
255
  BlueOssSoFileId_Info = 0,
@@ -256,7 +257,7 @@ typedef enum BlueOssSoFileId {
256
257
  BlueOssSoFileId_Event = 2,
257
258
  BlueOssSoFileId_Blacklist = 3,
258
259
  BlueOssSoFileId_CustomerExtensions = 4
259
- } BlueOssSoFileId_t;
260
+ } pb_packed BlueOssSoFileId_t;
260
261
 
261
262
  /* Struct definitions */
262
263
  typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
@@ -508,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
508
509
  } BlueOssSoDTSchedule_t;
509
510
 
510
511
  typedef struct BlueOssSoDoorInfo {
511
- uint32_t id;
512
+ uint16_t id;
512
513
  BlueOssSoDoorInfoAccessBy_t accessBy;
513
- uint32_t dtScheduleNumber;
514
+ uint8_t dtScheduleNumber;
514
515
  BlueAccessType_t accessType;
515
516
  } BlueOssSoDoorInfo_t;
516
517
 
517
518
  typedef struct BlueOssSoEvent {
518
519
  BlueLocalTimestamp_t eventTime;
519
- uint32_t doorId;
520
+ uint16_t doorId;
520
521
  BlueEventId_t eventId;
521
522
  /* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
522
523
  If eventId = SystemEvent -> BlueEventInfoSystem
523
524
  Otherwise unused */
524
- uint32_t eventInfo;
525
+ uint8_t eventInfo;
525
526
  } BlueOssSoEvent_t;
526
527
 
527
528
  typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
@@ -1713,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1713
1714
  #define BLUEOSSSIDSETTINGS_SIZE 62
1714
1715
  #define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
1715
1716
  #define BLUEOSSSIDVERSION_SIZE 12
1716
- #define BLUEOSSSOCONFIGURATION_SIZE 28568
1717
+ #define BLUEOSSSOCONFIGURATION_SIZE 26018
1717
1718
  #define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
1718
1719
  #define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
1719
1720
  #define BLUEOSSSOCREDENTIALTYPE_SIZE 17
1720
- #define BLUEOSSSODOORINFO_SIZE 16
1721
+ #define BLUEOSSSODOORINFO_SIZE 11
1721
1722
  #define BLUEOSSSODTSCHEDULEDAY_SIZE 70
1722
1723
  #define BLUEOSSSODTSCHEDULE_SIZE 288
1723
- #define BLUEOSSSOEVENT_SIZE 35
1724
+ #define BLUEOSSSOEVENT_SIZE 30
1724
1725
  #define BLUEOSSSOEXTFEATURE_SIZE 72
1725
1726
  #define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
1726
1727
  #define BLUEOSSSOFILEBLACKLIST_SIZE 9435
1727
1728
  #define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
1728
- #define BLUEOSSSOFILEDATA_SIZE 8996
1729
- #define BLUEOSSSOFILEEVENT_SIZE 9449
1729
+ #define BLUEOSSSOFILEDATA_SIZE 7721
1730
+ #define BLUEOSSSOFILEEVENT_SIZE 8174
1730
1731
  #define BLUEOSSSOFILEINFO_SIZE 57
1731
1732
  #define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
1732
1733
  #define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
@@ -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;
@@ -115,7 +116,7 @@ typedef enum BlueTimeUnit {
115
116
  BlueTimeUnit_Days = 4,
116
117
  BlueTimeUnit_Months = 5,
117
118
  BlueTimeUnit_Years = 6
118
- } BlueTimeUnit_t;
119
+ } pb_packed BlueTimeUnit_t;
119
120
 
120
121
  /* Those may never be changed */
121
122
  typedef enum BlueWeekday {
@@ -126,7 +127,7 @@ typedef enum BlueWeekday {
126
127
  BlueWeekday_Friday = 4,
127
128
  BlueWeekday_Saturday = 5,
128
129
  BlueWeekday_Sunday = 6
129
- } BlueWeekday_t;
130
+ } pb_packed BlueWeekday_t;
130
131
 
131
132
  typedef enum BlueCredentialType {
132
133
  /* Regular credential can only open / enter */
@@ -137,7 +138,7 @@ typedef enum BlueCredentialType {
137
138
  BlueCredentialType_Master = 3,
138
139
  /* Nfc writer allows to write any credential within this site on cards & fobs */
139
140
  BlueCredentialType_NfcWriter = 4
140
- } BlueCredentialType_t;
141
+ } pb_packed BlueCredentialType_t;
141
142
 
142
143
  typedef enum BlueAccessType {
143
144
  /* Access with default unlock time */
@@ -156,13 +157,13 @@ typedef enum BlueAccessType {
156
157
  BlueAccessType_NoAccessValidity = 7,
157
158
  /* No access due blacklisted */
158
159
  BlueAccessType_NoAccessBlacklisted = 8
159
- } BlueAccessType_t;
160
+ } pb_packed BlueAccessType_t;
160
161
 
161
162
  typedef enum BlueTransponderType {
162
163
  BlueTransponderType_UnknownTransponder = 0,
163
164
  BlueTransponderType_MobileTransponder = 1,
164
165
  BlueTransponderType_MifareDesfire = 2
165
- } BlueTransponderType_t;
166
+ } pb_packed BlueTransponderType_t;
166
167
 
167
168
  typedef enum BlueHardwareType {
168
169
  BlueHardwareType_UnknownHardware = 0,
@@ -172,7 +173,7 @@ typedef enum BlueHardwareType {
172
173
  BlueHardwareType_DoorHandleLock = 4,
173
174
  BlueHardwareType_WallReader = 5,
174
175
  BlueHardwareType_Kiosk = 6
175
- } BlueHardwareType_t;
176
+ } pb_packed BlueHardwareType_t;
176
177
 
177
178
  typedef enum BlueBatteryLevel {
178
179
  BlueBatteryLevel_UnknownBattery = 0,
@@ -184,9 +185,9 @@ typedef enum BlueBatteryLevel {
184
185
  /* 0% (100) - 100% (200) */
185
186
  BlueBatteryLevel_FullyDischarged = 100,
186
187
  BlueBatteryLevel_FullyCharged = 200
187
- } BlueBatteryLevel_t;
188
+ } pb_packed BlueBatteryLevel_t;
188
189
 
189
- typedef enum BlueEventId { /* Oss So events -- */
190
+ typedef enum BlueEventId {
190
191
  /* * eventInfo = 0 */
191
192
  BlueEventId_BatteryLow = 1,
192
193
  /* * eventInfo = 0 */
@@ -216,14 +217,14 @@ typedef enum BlueEventId { /* Oss So events -- */
216
217
  BlueEventId_TerminalCommand = 14,
217
218
  /* * eventInfo = BlueReturnCode */
218
219
  BlueEventId_TerminalOss = 15
219
- } BlueEventId_t;
220
+ } pb_packed BlueEventId_t;
220
221
 
221
- typedef enum BlueEventInfoSystem { /* Oss So events -- */
222
+ typedef enum BlueEventInfoSystem {
222
223
  BlueEventInfoSystem_SystemRestart = 1,
223
224
  BlueEventInfoSystem_SystemConfigured = 2
224
- } BlueEventInfoSystem_t;
225
+ } pb_packed BlueEventInfoSystem_t;
225
226
 
226
- typedef enum BlueEventInfoAccess { /* Oss So events -- */
227
+ typedef enum BlueEventInfoAccess {
227
228
  BlueEventInfoAccess_Granted = 1,
228
229
  BlueEventInfoAccess_GrantedDefaultTime = 2,
229
230
  BlueEventInfoAccess_GrantedExtendedTime = 3,
@@ -233,22 +234,22 @@ typedef enum BlueEventInfoAccess { /* Oss So events -- */
233
234
  BlueEventInfoAccess_DeniedBlacklisted = 130,
234
235
  BlueEventInfoAccess_DeniedValidity = 131,
235
236
  BlueEventInfoAccess_DeniedDTSchedule = 132
236
- } BlueEventInfoAccess_t;
237
+ } pb_packed BlueEventInfoAccess_t;
237
238
 
238
239
  typedef enum BlueOssCredentialTypeSource {
239
240
  BlueOssCredentialTypeSource_Oss = 0,
240
241
  BlueOssCredentialTypeSource_Proprietary = 1
241
- } BlueOssCredentialTypeSource_t;
242
+ } pb_packed BlueOssCredentialTypeSource_t;
242
243
 
243
244
  typedef enum BlueOssSoCredentialTypeOssCredential {
244
245
  BlueOssSoCredentialTypeOssCredential_Standard = 0,
245
246
  BlueOssSoCredentialTypeOssCredential_InterventionMedia = 1
246
- } BlueOssSoCredentialTypeOssCredential_t;
247
+ } pb_packed BlueOssSoCredentialTypeOssCredential_t;
247
248
 
248
249
  typedef enum BlueOssSoDoorInfoAccessBy {
249
250
  BlueOssSoDoorInfoAccessBy_DoorGroupId = 0,
250
251
  BlueOssSoDoorInfoAccessBy_DoorId = 1
251
- } BlueOssSoDoorInfoAccessBy_t;
252
+ } pb_packed BlueOssSoDoorInfoAccessBy_t;
252
253
 
253
254
  typedef enum BlueOssSoFileId {
254
255
  BlueOssSoFileId_Info = 0,
@@ -256,7 +257,7 @@ typedef enum BlueOssSoFileId {
256
257
  BlueOssSoFileId_Event = 2,
257
258
  BlueOssSoFileId_Blacklist = 3,
258
259
  BlueOssSoFileId_CustomerExtensions = 4
259
- } BlueOssSoFileId_t;
260
+ } pb_packed BlueOssSoFileId_t;
260
261
 
261
262
  /* Struct definitions */
262
263
  typedef PB_BYTES_ARRAY_T(160) BlueSharedDemoData_terminalPrivateKey_t;
@@ -508,20 +509,20 @@ typedef struct BlueOssSoDTSchedule {
508
509
  } BlueOssSoDTSchedule_t;
509
510
 
510
511
  typedef struct BlueOssSoDoorInfo {
511
- uint32_t id;
512
+ uint16_t id;
512
513
  BlueOssSoDoorInfoAccessBy_t accessBy;
513
- uint32_t dtScheduleNumber;
514
+ uint8_t dtScheduleNumber;
514
515
  BlueAccessType_t accessType;
515
516
  } BlueOssSoDoorInfo_t;
516
517
 
517
518
  typedef struct BlueOssSoEvent {
518
519
  BlueLocalTimestamp_t eventTime;
519
- uint32_t doorId;
520
+ uint16_t doorId;
520
521
  BlueEventId_t eventId;
521
522
  /* If eventId = AccessGranted or AccessDenied -> BlueEventInfoAccess
522
523
  If eventId = SystemEvent -> BlueEventInfoSystem
523
524
  Otherwise unused */
524
- uint32_t eventInfo;
525
+ uint8_t eventInfo;
525
526
  } BlueOssSoEvent_t;
526
527
 
527
528
  typedef PB_BYTES_ARRAY_T(64) BlueOssSoExtFeature_value_t;
@@ -1713,20 +1714,20 @@ extern const pb_msgdesc_t _BlueTestEncodeDecode_t_msg;
1713
1714
  #define BLUEOSSSIDSETTINGS_SIZE 62
1714
1715
  #define BLUEOSSSIDSTORAGEPROFILE_SIZE 24
1715
1716
  #define BLUEOSSSIDVERSION_SIZE 12
1716
- #define BLUEOSSSOCONFIGURATION_SIZE 28568
1717
+ #define BLUEOSSSOCONFIGURATION_SIZE 26018
1717
1718
  #define BLUEOSSSOCREDENTIALTYPEOSS_SIZE 2
1718
1719
  #define BLUEOSSSOCREDENTIALTYPEPROPRIETARY_SIZE 9
1719
1720
  #define BLUEOSSSOCREDENTIALTYPE_SIZE 17
1720
- #define BLUEOSSSODOORINFO_SIZE 16
1721
+ #define BLUEOSSSODOORINFO_SIZE 11
1721
1722
  #define BLUEOSSSODTSCHEDULEDAY_SIZE 70
1722
1723
  #define BLUEOSSSODTSCHEDULE_SIZE 288
1723
- #define BLUEOSSSOEVENT_SIZE 35
1724
+ #define BLUEOSSSOEVENT_SIZE 30
1724
1725
  #define BLUEOSSSOEXTFEATURE_SIZE 72
1725
1726
  #define BLUEOSSSOEXTFEATURE_VALIDITYSTART_SIZE 23
1726
1727
  #define BLUEOSSSOFILEBLACKLIST_SIZE 9435
1727
1728
  #define BLUEOSSSOFILECUSTOMEREXTENSIONS_SIZE 617
1728
- #define BLUEOSSSOFILEDATA_SIZE 8996
1729
- #define BLUEOSSSOFILEEVENT_SIZE 9449
1729
+ #define BLUEOSSSOFILEDATA_SIZE 7721
1730
+ #define BLUEOSSSOFILEEVENT_SIZE 8174
1730
1731
  #define BLUEOSSSOFILEINFO_SIZE 57
1731
1732
  #define BLUEOSSSOMIFAREDESFIRECONFIGURATION_SIZE 60
1732
1733
  #define BLUEOSSSOMIFAREDESFIREPROVISIONINGCONFIGURATION_SIZE 56
@@ -40,16 +40,23 @@ internal struct BlueAccessAPIHelper {
40
40
  }
41
41
  }
42
42
 
43
+ // Before issuing a new token, we should always delete the current one.
44
+ // Whenever we issue a new token, the backend purges any other tokens.
45
+ // So, in case we are not able to store the token in the keychain, we won't end up having a nonexistent token for upcoming requests.
46
+ _ = try blueAccessAuthenticationTokensKeyChain.deleteEntry(id: credential.credentialID.id)
47
+
43
48
  let accessToken: BlueAccessToken = try await self.blueAPI.getAccessToken(credentialId: credential.credentialID.id).getData()
44
49
 
45
- self.storeAccessToken(credential: credential, accessToken: accessToken)
50
+ storeAccessToken(credential: credential, accessToken: accessToken)
46
51
 
47
52
  return accessToken
48
53
  }
49
54
 
50
55
  private func storeAccessToken(credential: BlueAccessCredential, accessToken: BlueAccessToken) {
51
56
  do {
52
- try? blueAccessAuthenticationTokensKeyChain.storeCodableEntry(id: credential.credentialID.id, data: accessToken)
57
+ try blueAccessAuthenticationTokensKeyChain.storeCodableEntry(id: credential.credentialID.id, data: accessToken)
58
+ } catch {
59
+ blueLogError(error.localizedDescription)
53
60
  }
54
61
  }
55
62
  }
@@ -131,7 +131,7 @@ internal class BlueSynchronizeMobileAccessCommand: BlueAbstractSynchronizeAccess
131
131
  updatedCredential.validity = BlueLocalTimestamp(Date(timeIntervalSince1970: TimeInterval(validity/1000)))
132
132
  }
133
133
 
134
- try blueAccessCredentialsKeyChain.storeEntry(id: updatedCredential.credentialID.id, data: updatedCredential.jsonUTF8Data())
134
+ try blueAccessCredentialsKeyChain.updateEntry(id: updatedCredential.credentialID.id, data: updatedCredential.jsonUTF8Data())
135
135
 
136
136
  let deviceList = synchronizationResult.getAccessDeviceList()
137
137
  try blueAccessDevicesStorage.storeEntry(id: credential.credentialID.id, data: deviceList.jsonUTF8Data())
@@ -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
@@ -685,7 +688,6 @@ extension BlueBatteryLevel: CaseIterable {
685
688
 
686
689
  #endif // swift(>=4.2)
687
690
 
688
- /// Oss So events --
689
691
  public enum BlueEventId: SwiftProtobuf.Enum {
690
692
  public typealias RawValue = Int
691
693
 
@@ -787,7 +789,6 @@ extension BlueEventId: CaseIterable {
787
789
 
788
790
  #endif // swift(>=4.2)
789
791
 
790
- /// Oss So events --
791
792
  public enum BlueEventInfoSystem: SwiftProtobuf.Enum {
792
793
  public typealias RawValue = Int
793
794
  case systemRestart // = 1
@@ -822,7 +823,6 @@ extension BlueEventInfoSystem: CaseIterable {
822
823
 
823
824
  #endif // swift(>=4.2)
824
825
 
825
- /// Oss So events --
826
826
  public enum BlueEventInfoAccess: SwiftProtobuf.Enum {
827
827
  public typealias RawValue = Int
828
828
  case granted // = 1
@@ -3536,6 +3536,7 @@ extension BlueReturnCode: SwiftProtobuf._ProtoNameProviding {
3536
3536
  public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
3537
3537
  -1100: .same(proto: "OssMAReturnCodeEnd"),
3538
3538
  -1000: .same(proto: "OssMAReturnCodeStart"),
3539
+ -416: .same(proto: "SdkTimeout"),
3539
3540
  -415: .same(proto: "SdkFetchDataFailed"),
3540
3541
  -414: .same(proto: "SdkDecodeJsonFailed"),
3541
3542
  -413: .same(proto: "SdkDecodeBase64Failed"),