Skip to content

Commit

Permalink
Merge branch 'release/26' of github.com:Anyline/anyline-ocr-react-nat…
Browse files Browse the repository at this point in the history
…ive-module into release/26
  • Loading branch information
Gerhard committed Nov 16, 2020
2 parents 031a125 + f965677 commit 8393801
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 18 deletions.
21 changes: 10 additions & 11 deletions example/RNExampleApp/ios/RNExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,8 @@
ORGANIZATIONNAME = Facebook;
TargetAttributes = {
13B07F861A680F5B00A75B9A = {
DevelopmentTeam = 2MSE892CA7;
LastSwiftMigration = 1110;
ProvisioningStyle = Manual;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -352,21 +351,21 @@
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 = (
"$(inherited)",
"-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;
Expand All @@ -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 = (
Expand All @@ -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";
Expand Down
12 changes: 6 additions & 6 deletions example/RNExampleApp/ios/RNExampleApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NFCReaderUsageDescription</key>
<string>Please allow NFC access to read passports</string>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
Expand All @@ -30,6 +24,8 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NFCReaderUsageDescription</key>
<string>Please allow NFC access to read passports</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
Expand Down Expand Up @@ -61,5 +57,9 @@
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>com.apple.developer.nfc.readersession.iso7816.select-identifiers</key>
<array>
<string>A0000002471001</string>
</array>
</dict>
</plist>
5 changes: 4 additions & 1 deletion plugin/ios/ALNFCScanViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 4 additions & 0 deletions plugin/ios/ALPluginScanViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 3 additions & 0 deletions plugin/ios/ALPluginScanViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ - (void)viewDidLoad {

[AnylineSDK setupWithLicenseKey:self.licensekey error:&error];
if (error) {
[self.delegate pluginScanViewController:self
didStopScanning:self
error:error];
return;
}

Expand Down
4 changes: 4 additions & 0 deletions plugin/ios/AnylineSDKPlugin.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"]) {
Expand Down

0 comments on commit 8393801

Please sign in to comment.