diff --git a/RNDocumentReaderApi.podspec b/RNDocumentReaderApi.podspec index b57242c..ba173e6 100644 --- a/RNDocumentReaderApi.podspec +++ b/RNDocumentReaderApi.podspec @@ -14,6 +14,6 @@ Pod::Spec.new do |s| s.source = { :http => 'file:' + __dir__ } s.ios.deployment_target = '11.0' s.source_files = "ios/*.{h,m}" - s.dependency 'DocumentReader', '7.3.3764' + s.dependency 'DocumentReader', '7.4.3826' s.dependency 'React' end diff --git a/android/build.gradle b/android/build.gradle index 04629ad..39b4f7b 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -41,7 +41,7 @@ dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' //noinspection GradleDependency - implementation('com.regula.documentreader:api:7.3.10030') { + implementation('com.regula.documentreader:api:7.4.10090') { transitive = true } } diff --git a/example/package-lock.json b/example/package-lock.json index 08c8b54..541460a 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -8,6 +8,8 @@ "name": "DocumentReader", "version": "0.0.1", "dependencies": { + "@regulaforensics/react-native-document-reader-api": "7.3.676", + "@regulaforensics/react-native-document-reader-core-fullauthrfid": "7.3.602", "@rneui/base": "4.0.0-rc.7", "@rneui/themed": "4.0.0-rc.7", "ip": "2.0.1", @@ -4049,6 +4051,18 @@ "react-native": "*" } }, + "node_modules/@regulaforensics/react-native-document-reader-api": { + "version": "7.3.676", + "resolved": "https://registry.npmjs.org/@regulaforensics/react-native-document-reader-api/-/react-native-document-reader-api-7.3.676.tgz", + "integrity": "sha512-UkzzdKVYpmZZYtUdWy+X5YHZnjS8xERqgBFJXXIFbhYZLKrnt+k8P8envGWV5pRtMXrUyAPrLX07UENJ1x5EGA==", + "license": "commercial" + }, + "node_modules/@regulaforensics/react-native-document-reader-core-fullauthrfid": { + "version": "7.3.602", + "resolved": "https://registry.npmjs.org/@regulaforensics/react-native-document-reader-core-fullauthrfid/-/react-native-document-reader-core-fullauthrfid-7.3.602.tgz", + "integrity": "sha512-LiJWglGvn1ph5blzq3rSU98KQ4YIiPL6qkJyRwynLuvzmnmDUI+2LoocG/7OrA8M3hZlbt16XDFqISii/BvJ6Q==", + "license": "commercial" + }, "node_modules/@rneui/base": { "version": "4.0.0-rc.7", "license": "MIT", @@ -6736,7 +6750,9 @@ "license": "MIT" }, "node_modules/fast-xml-parser": { - "version": "4.4.0", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.4.1.tgz", + "integrity": "sha512-xkjOecfnKGkSsOwtZ5Pz7Us/T6mrbPQrq0nh+aCO5V9nk5NLWmasAHumTKjiPJPWANe+kAZ84Jc8ooJkzZ88Sw==", "funding": [ { "type": "github", diff --git a/example/package.json b/example/package.json index de9b2fa..0bd674c 100644 --- a/example/package.json +++ b/example/package.json @@ -10,8 +10,8 @@ "test": "jest" }, "dependencies": { - "@regulaforensics/react-native-document-reader-api": "7.3.676", - "@regulaforensics/react-native-document-reader-core-fullauthrfid": "7.3.602", + "@regulaforensics/react-native-document-reader-api": "7.4.690", + "@regulaforensics/react-native-document-reader-core-fullauthrfid": "7.4.638", "react-native-progress": "5.0.0", "react-native-radio-buttons-group": "3.0.5", "@rneui/base": "4.0.0-rc.7", diff --git a/ios/RNRegulaDocumentReader.m b/ios/RNRegulaDocumentReader.m index 2e22244..7a7ed7c 100644 --- a/ios/RNRegulaDocumentReader.m +++ b/ios/RNRegulaDocumentReader.m @@ -23,9 +23,13 @@ @implementation RNRegulaDocumentReader RGLWOnCustomButtonTappedEvent]; } +static bool hasListeners; +-(void)startObserving { hasListeners = YES; } +-(void)stopObserving { hasListeners = NO; } + static RGLWEventSender sendEvent = ^(NSString* event, id data) { dispatch_async(dispatch_get_main_queue(), ^{ - [RGLWPlugin sendEventWithName:event body:@{@"msg": data}]; + if (hasListeners) [RGLWPlugin sendEventWithName:event body:@{@"msg": data}]; }); }; diff --git a/package.json b/package.json index 18f25a0..eee3985 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@regulaforensics/react-native-document-reader-api", - "version": "7.3.676", + "version": "7.4.690", "description": "React Native module for reading and validation of identification documents (API framework)", "main": "index.js", "scripts": {