diff --git a/example/RNExampleApp/android/app/build.gradle b/example/RNExampleApp/android/app/build.gradle index 2bb3b53..9711e11 100644 --- a/example/RNExampleApp/android/app/build.gradle +++ b/example/RNExampleApp/android/app/build.gradle @@ -87,7 +87,7 @@ android { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion versionCode 5 - versionName "53.0.0" + versionName "53.2.0" multiDexEnabled true buildConfigField("boolean", "REACT_NATIVE_UNSTABLE_USE_RUNTIME_SCHEDULER_ALWAYS", (findProperty("reactNative.unstable_useRuntimeSchedulerAlways") ?: true).toString()) diff --git a/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj b/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj index 2064923..ca514d5 100644 --- a/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj +++ b/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj @@ -272,7 +272,7 @@ inputPaths = ( "${PODS_ROOT}/Target Support Files/Pods-RNExampleApp/Pods-RNExampleApp-resources.sh", "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/AccessibilityResources.bundle", - "${PODS_ROOT}/Anyline/AnylineSDK_iOS_53.0.0/Framework/AnylineResources.bundle", + "${PODS_ROOT}/Anyline/AnylineSDK_iOS_53.2.0/Framework/AnylineResources.bundle", ); name = "[CP] Copy Pods Resources"; outputPaths = ( @@ -347,7 +347,7 @@ INFOPLIST_FILE = RNExampleApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 53.0.0; + MARKETING_VERSION = 53.2.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -380,7 +380,7 @@ INFOPLIST_FILE = RNExampleApp/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 53.0.0; + MARKETING_VERSION = 53.2.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", diff --git a/example/RNExampleApp/package.json b/example/RNExampleApp/package.json index 6e3507f..3190b06 100644 --- a/example/RNExampleApp/package.json +++ b/example/RNExampleApp/package.json @@ -1,6 +1,6 @@ { "name": "react-native-example-app", - "version": "53.0.0", + "version": "53.2.0", "private": true, "scripts": { "initProject": "yarn add expo && yarn add ../../plugin", diff --git a/plugin/android/build.gradle b/plugin/android/build.gradle index 8253c04..482c932 100755 --- a/plugin/android/build.gradle +++ b/plugin/android/build.gradle @@ -61,7 +61,7 @@ repositories { dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) - implementation 'io.anyline:anylinesdk:53.0.0' + implementation 'io.anyline:anylinesdk:53.2.0' implementation "com.facebook.react:react-native:+" implementation("com.google.android.material:material:1.9.0") implementation 'androidx.multidex:multidex:2.0.1' diff --git a/plugin/ios/ALPluginHelper.m b/plugin/ios/ALPluginHelper.m index baeb370..c5c503f 100644 --- a/plugin/ios/ALPluginHelper.m +++ b/plugin/ios/ALPluginHelper.m @@ -27,7 +27,7 @@ + (void)startScan:(NSDictionary *)config finished:(ALPluginCallback)callback { if (@available(iOS 13.0, *)) { if (![ALNFCDetector readingAvailable]) { - callback(nil, [NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": @"NFC passport reading is not supported on this device or app."}]); + callback(nil, [NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: @"NFC passport reading is not supported on this device or app."}]); return; } @@ -43,7 +43,7 @@ + (void)startScan:(NSDictionary *)config finished:(ALPluginCallback)callback { completion:nil]; } } else { - callback(nil,[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": @"NFC passport reading is only supported on iOS 13 and later."}]); + callback(nil,[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: @"NFC passport reading is only supported on iOS 13 and later."}]); return; } } else { @@ -289,7 +289,7 @@ + (BOOL)showErrorAlertIfNeeded:(NSError *)error pluginCallback:(ALPluginCallback [[UIApplication sharedApplication].keyWindow.rootViewController dismissViewControllerAnimated:YES completion:^{ - callback(nil, [NSError errorWithDomain:@"" code:-1 userInfo:@{@"Error reason": @"Canceled"}]); + callback(nil, [NSError errorWithDomain:@"" code:-1 userInfo:@{NSLocalizedDescriptionKey: @"Canceled"}]); }]; }]; diff --git a/plugin/ios/AnylineReact.podspec b/plugin/ios/AnylineReact.podspec index eb2ec02..5307181 100644 --- a/plugin/ios/AnylineReact.podspec +++ b/plugin/ios/AnylineReact.podspec @@ -18,7 +18,7 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Anyline/anyline-ocr-react-native-module.git", :tag => "#{s.version}" } s.source_files = "*.{h,m}" - s.dependency "Anyline", "53.0.0" + s.dependency "Anyline", "53.2.0" s.dependency "React" end \ No newline at end of file diff --git a/plugin/ios/AnylineSDKPlugin.m b/plugin/ios/AnylineSDKPlugin.m index 9e1bb18..d51ce85 100644 --- a/plugin/ios/AnylineSDKPlugin.m +++ b/plugin/ios/AnylineSDKPlugin.m @@ -83,7 +83,7 @@ - (UIView *)view { if (!success) { NSLog(@"error: %@", error.localizedDescription); errorString = @"Unable to initialize the Anyline SDK. Please check your license key."; - [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": errorString}]]; + [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: errorString}]]; return; } @@ -127,7 +127,7 @@ - (UIView *)view { if (!exportPath) { NSString *errorString = @"Event cache is empty."; - [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": errorString}]]; + [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: errorString}]]; } else { [self returnSuccess:exportPath]; } @@ -181,10 +181,10 @@ - (void)initView:(NSString *)scanMode { [[[UIApplication sharedApplication] keyWindow].rootViewController presentViewController:nfcScanViewController animated:YES completion:nil]; } } else { - [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": @"NFC passport reading is not supported on this device or app."}]]; + [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: @"NFC passport reading is not supported on this device or app."}]]; } } else { - [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": @"NFC passport reading is only supported on iOS 13 and later."}]]; + [self returnError:[NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: @"NFC passport reading is only supported on iOS 13 and later."}]]; } } else { @@ -236,7 +236,7 @@ - (void)pluginScanViewController:(nonnull ALPluginScanViewController *)pluginSca } - (void)pluginScanViewController:(nonnull ALPluginScanViewController *)pluginScanViewController didStopScanning:(nonnull id)sender { - [self returnError: [NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{@"Error reason": @"Canceled"}]]; + [self returnError: [NSError errorWithDomain:@"ALReactDomain" code:100 userInfo:@{NSLocalizedDescriptionKey: @"Canceled"}]]; } - (void)pluginScanViewController:(ALPluginScanViewController *)pluginScanViewController didStopScanning:(id)sender error:(NSError *)error { diff --git a/plugin/package.json b/plugin/package.json index c9dd000..9c79d84 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { - "_from": "anyline-ocr-react-native-module@^53.0.0", - "_id": "anyline-ocr-react-native-module@^53.0.0", + "_from": "anyline-ocr-react-native-module@^53.2.0", + "_id": "anyline-ocr-react-native-module@^53.2.0", "_inBundle": false, "_integrity": "sha512-BGi9zNkSsoxXywDBIqzgBRvKUBniQOJHDKBrozZubKthZNRBAj8Ry5tW0Me0yLXt/fauME//hbC0wsenfPJZqw==", "_location": "/anyline-ocr-react-native-module", @@ -8,19 +8,19 @@ "_requested": { "type": "range", "registry": true, - "raw": "anyline-ocr-react-native-module@^53.0.0", + "raw": "anyline-ocr-react-native-module@^53.2.0", "name": "anyline-ocr-react-native-module", "escapedName": "anyline-ocr-react-native-module", - "rawSpec": "^53.0.0", + "rawSpec": "^53.2.0", "saveSpec": null, - "fetchSpec": "^53.0.0" + "fetchSpec": "^53.2.0" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/anyline-ocr-react-native-module/-/anyline-ocr-react-native-module-53.0.0.tgz", + "_resolved": "https://registry.npmjs.org/anyline-ocr-react-native-module/-/anyline-ocr-react-native-module-53.2.0.tgz", "_shasum": "bacbcd260cc662244f59393ed81a6edba009b52c", - "_spec": "anyline-ocr-react-native-module@^53.0.0", + "_spec": "anyline-ocr-react-native-module@^53.2.0", "_where": "/Users/amiransari/Projects/anyline-ocr-react-native-module1/example/RNExampleApp", "bugs": { "url": "https://github.com/Anyline/anyline-ocr-react-native-module/issues" @@ -47,5 +47,5 @@ "type": "git", "url": "git+https://github.com/Anyline/anyline-ocr-react-native-module.git" }, - "version": "53.0.0" + "version": "53.2.0" }