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"]) {