From 3a4513e4783281463bfd68b0cd94e0af5cb62958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Mu=CC=88ller?= Date: Mon, 16 Nov 2020 16:08:36 +0100 Subject: [PATCH 1/2] bumped iOS versions --- example/RNExampleApp/ios/RNExampleApp/Info.plist | 14 +++++++------- example/RNExampleApp/package.json | 2 +- plugin/ios/AnylineReact.podspec | 2 +- plugin/package.json | 16 ++++++++-------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/example/RNExampleApp/ios/RNExampleApp/Info.plist b/example/RNExampleApp/ios/RNExampleApp/Info.plist index 620413f3..5ee90cd6 100644 --- a/example/RNExampleApp/ios/RNExampleApp/Info.plist +++ b/example/RNExampleApp/ios/RNExampleApp/Info.plist @@ -2,12 +2,6 @@ - NFCReaderUsageDescription - Please allow NFC access to read passports - com.apple.developer.nfc.readersession.iso7816.select-identifiers - - A0000002471001 - CFBundleDevelopmentRegion en CFBundleDisplayName @@ -23,13 +17,15 @@ CFBundlePackageType APPL CFBundleShortVersionString - 25.0.0 + 26.0.0 CFBundleSignature ???? CFBundleVersion 1 LSRequiresIPhoneOS + NFCReaderUsageDescription + Please allow NFC access to read passports NSAppTransportSecurity NSAllowsArbitraryLoads @@ -61,5 +57,9 @@ UIViewControllerBasedStatusBarAppearance + com.apple.developer.nfc.readersession.iso7816.select-identifiers + + A0000002471001 + diff --git a/example/RNExampleApp/package.json b/example/RNExampleApp/package.json index f5f2c2c5..e9c974be 100644 --- a/example/RNExampleApp/package.json +++ b/example/RNExampleApp/package.json @@ -1,6 +1,6 @@ { "name": "RNExampleApp", - "version": "25.0.0", + "version": "26.0.0", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", diff --git a/plugin/ios/AnylineReact.podspec b/plugin/ios/AnylineReact.podspec index bb416533..c9e34be0 100644 --- a/plugin/ios/AnylineReact.podspec +++ b/plugin/ios/AnylineReact.podspec @@ -19,6 +19,6 @@ 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", "~> 25" + s.dependency "Anyline", "~> 26" s.dependency "React" end diff --git a/plugin/package.json b/plugin/package.json index 1f4dd931..aca47a96 100644 --- a/plugin/package.json +++ b/plugin/package.json @@ -1,6 +1,6 @@ { - "_from": "anyline-ocr-react-native-module@^25.0.0", - "_id": "anyline-ocr-react-native-module@25.0.0", + "_from": "anyline-ocr-react-native-module@^26.0.0", + "_id": "anyline-ocr-react-native-module@26.0.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@^25.0.0", + "raw": "anyline-ocr-react-native-module@^26.0.0", "name": "anyline-ocr-react-native-module", "escapedName": "anyline-ocr-react-native-module", - "rawSpec": "^25.0.0", + "rawSpec": "^26.0.0", "saveSpec": null, - "fetchSpec": "^25.0.0" + "fetchSpec": "^26.0.0" }, "_requiredBy": [ "/" ], - "_resolved": "https://registry.npmjs.org/anyline-ocr-react-native-module/-/anyline-ocr-react-native-module-25.0.0.tgz", + "_resolved": "https://registry.npmjs.org/anyline-ocr-react-native-module/-/anyline-ocr-react-native-module-26.0.0.tgz", "_shasum": "62ab2a6c30e365851e5c6951546576a711d9183e", - "_spec": "anyline-ocr-react-native-module@^25.0.0", + "_spec": "anyline-ocr-react-native-module@^26.0.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": "25.0.0" + "version": "26.0.0" } From f965677099d6885032710ff5ac7a2c7f994ca303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Mu=CC=88ller?= Date: Mon, 16 Nov 2020 16:34:50 +0100 Subject: [PATCH 2/2] updated Licensing error handling --- .../RNExampleApp.xcodeproj/project.pbxproj | 21 +++++++++---------- plugin/ios/ALNFCScanViewController.m | 5 ++++- plugin/ios/ALPluginScanViewController.h | 4 ++++ plugin/ios/ALPluginScanViewController.m | 3 +++ plugin/ios/AnylineSDKPlugin.m | 4 ++++ 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj b/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj index 5c2b041d..c167ad0f 100644 --- a/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj +++ b/example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj @@ -185,9 +185,8 @@ ORGANIZATIONNAME = Facebook; TargetAttributes = { 13B07F861A680F5B00A75B9A = { - DevelopmentTeam = 2MSE892CA7; LastSwiftMigration = 1110; - ProvisioningStyle = Manual; + ProvisioningStyle = Automatic; }; }; }; @@ -352,11 +351,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = RNExampleApp/RNExampleApp.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; - DEVELOPMENT_TEAM = 2MSE892CA7; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = RNExampleApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -364,9 +363,9 @@ "-ObjC", "-lc++", ); - PRODUCT_BUNDLE_IDENTIFIER = com.anyline.example.reactnative.beta; + PRODUCT_BUNDLE_IDENTIFIER = com.anyline.example.reactnative; PRODUCT_NAME = RNExampleApp; - PROVISIONING_PROFILE_SPECIFIER = "Anyline In House Distribution Profile"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "RNExampleApp-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -382,10 +381,10 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = RNExampleApp/RNExampleApp.entitlements; - CODE_SIGN_IDENTITY = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; + CODE_SIGN_IDENTITY = "Apple Development"; + CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = 2MSE892CA7; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = RNExampleApp/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = ( @@ -395,7 +394,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.anyline.example.reactnative.beta; PRODUCT_NAME = RNExampleApp; - PROVISIONING_PROFILE_SPECIFIER = "Anyline In House Distribution Profile"; + PROVISIONING_PROFILE_SPECIFIER = ""; SWIFT_OBJC_BRIDGING_HEADER = "RNExampleApp-Bridging-Header.h"; SWIFT_VERSION = 5.0; VALID_ARCHS = "arm64 arm64e armv7 armv7s"; diff --git a/plugin/ios/ALNFCScanViewController.m b/plugin/ios/ALNFCScanViewController.m index 4f3c9451..e7c27676 100644 --- a/plugin/ios/ALNFCScanViewController.m +++ b/plugin/ios/ALNFCScanViewController.m @@ -114,12 +114,15 @@ - (void)viewDidLoad { //Set scanOptions for MRZConfig mrzConfig.idFieldScanOptions = scanOptions; } - + NSError *error = nil; //Init the anyline sdk with your license key [AnylineSDK setupWithLicenseKey:self.licensekey error:&error]; if (error) { + [self.delegate pluginScanViewController:nil + didStopScanning:self + error:error]; return; } //Init the anyline ID ScanPlugin with an ID, Licensekey, the delegate, diff --git a/plugin/ios/ALPluginScanViewController.h b/plugin/ios/ALPluginScanViewController.h index e4540d79..7247ce61 100644 --- a/plugin/ios/ALPluginScanViewController.h +++ b/plugin/ios/ALPluginScanViewController.h @@ -37,6 +37,10 @@ NS_ASSUME_NONNULL_BEGIN - (void)pluginScanViewController:(ALPluginScanViewController *)pluginScanViewController didStopScanning:(id)sender; + +- (void)pluginScanViewController:(ALPluginScanViewController *)pluginScanViewController + didStopScanning:(id)sender + error:(NSError *)error; @end NS_ASSUME_NONNULL_END diff --git a/plugin/ios/ALPluginScanViewController.m b/plugin/ios/ALPluginScanViewController.m index 1c60fd04..77b926f2 100644 --- a/plugin/ios/ALPluginScanViewController.m +++ b/plugin/ios/ALPluginScanViewController.m @@ -60,6 +60,9 @@ - (void)viewDidLoad { [AnylineSDK setupWithLicenseKey:self.licensekey error:&error]; if (error) { + [self.delegate pluginScanViewController:self + didStopScanning:self + error:error]; return; } diff --git a/plugin/ios/AnylineSDKPlugin.m b/plugin/ios/AnylineSDKPlugin.m index 134233d1..f6f11349 100644 --- a/plugin/ios/AnylineSDKPlugin.m +++ b/plugin/ios/AnylineSDKPlugin.m @@ -193,6 +193,10 @@ - (void)pluginScanViewController:(nonnull ALPluginScanViewController *)pluginSca [self returnError:(@"Canceled")]; } +- (void)pluginScanViewController:(ALPluginScanViewController *)pluginScanViewController didStopScanning:(id)sender error:(NSError *)error { + [self returnError:error.debugDescription]; +} + - (ALScanMode)energyScanModeFromString:(NSString *)scanMode{ if ([[scanMode uppercaseString] isEqualToString:@"ANALOG_METER"]) {