Skip to content

Commit 3f12b32

Browse files
author
build
committed
New version of React Native CaptureSDK
1 parent 39bdd3f commit 3f12b32

File tree

5 files changed

+33
-7
lines changed

5 files changed

+33
-7
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
This file tracks released versions with the changes made to this project.
44

5+
## Version 1.5.130
6+
7+
### Improvements
8+
9+
- Updated the [iOS CaptureSDK](https://github.com/SocketMobile/cocoapods-capturesdk) to `v1.9.139`.
10+
- On iOS, you can get the `tagId` data so you can get the NFC Tag ID
11+
12+
### Fixed
13+
14+
- The [issue](https://github.com/SocketMobile/react-native-capture/issues/12) has been fixed.
15+
516
## Version 1.5.124
617

718
### Improvements

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# React Natice CaptureSDK - Version 1.5.124
1+
# React Natice CaptureSDK - Version 1.5.130
22

33
This react native module allows a React Native application to use and control Socket Mobile wireless barcode scanners, NFC Reader/Writer, and Camera to capture and deliver data capture to such application.
44

@@ -74,7 +74,7 @@ In version `>1.5`, we are removing the `android/libs` folder and it's contents.
7474
}
7575
```
7676

77-
Next, in their `app/gradle.build` file, they will need to add the below code.
77+
Next, in their `app/build.gradle` file, they will need to add the below code.
7878

7979
```groovy
8080
packagingOptions {

ios/Capturesdk.mm

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,12 +522,16 @@ -(NSString*)ConvertToJsonRpcEventFromEvent:(SKTCaptureEvent*)event fromCapture:(
522522
[json appendString:@", \"value\": {"];
523523
[json appendFormat:@"\"data\": %@,", [self ConvertToStringFromData:event.Data.DecodedData.DecodedData]];
524524
[json appendFormat:@"\"id\": %ld,", (long)event.Data.DecodedData.DataSourceID];
525-
526-
if ((long)event.Data.DecodedData.DataSourceID == SKTCaptureDataSourceIDNotSpecified ) {
525+
526+
if (event.Data.DecodedData.TagIdData.length > 0) {
527+
[json appendFormat:@" \"tagId\": \"%@\",", [self stringFromTagIdData:event.Data.DecodedData.TagIdData]];
528+
}
529+
530+
if ((long)event.Data.DecodedData.DataSourceID == SKTCaptureDataSourceIDNotSpecified) {
527531
[json appendFormat:@"\"name\": \"%s\"}}", ""];
528532
[json appendFormat:@", \"result\": \"%ld\"}", (long)SKTCaptureE_CANCEL];
529533
} else {
530-
[json appendFormat:@"\"name\": \"%@\"}}}", event.Data.DecodedData.DataSourceName];
534+
[json appendFormat:@" \"name\": \"%@\"}}}", event.Data.DecodedData.DataSourceName];
531535
}
532536
break;
533537
case SKTCaptureEventDataTypeDeviceInfo:
@@ -566,6 +570,17 @@ -(NSString*) ConvertToStringFromData:(NSData*)data {
566570
[stringData appendString:@"]"];
567571
return stringData;
568572
}
573+
574+
-(NSString *)stringFromTagIdData:(NSData *)tagIdData {
575+
const unsigned char *bytes = (const unsigned char *)tagIdData.bytes;
576+
NSMutableString *hexString = [NSMutableString stringWithCapacity:tagIdData.length * 2];
577+
for (NSUInteger i = 0; i < tagIdData.length; i++) {
578+
[hexString appendFormat:@"%02X", bytes[i]];
579+
}
580+
581+
return hexString;
582+
}
583+
569584
#pragma mark - Capture Helper Notifications
570585

571586

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-capture",
33
"title": "React Native CaptureSDK",
4-
"version": "1.5.124",
4+
"version": "1.5.130",
55
"description": "Socket Mobile CaptureSDK for React Native",
66
"main": "./lib/commonjs/index.js",
77
"module": "./lib/module/index.js",

react-native-capture.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Pod::Spec.new do |s|
1717
s.source_files = "ios/**/*.{h,c,m,mm,swift}"
1818
s.requires_arc = true
1919

20-
s.dependency 'CaptureSDK', '~>1.9.100'
20+
s.dependency 'CaptureSDK', '~>1.9.139'
2121

2222
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
2323
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.

0 commit comments

Comments
 (0)