Skip to content

Commit

Permalink
Added Anyline 43.0.0-preview.1
Browse files Browse the repository at this point in the history
  • Loading branch information
aldrichanyline committed Dec 15, 2022
1 parent 8eab895 commit ff992e5
Show file tree
Hide file tree
Showing 1,521 changed files with 68,875 additions and 89,503 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
[[self class] applyAppearanceTweaks];

NSError *error;
[AnylineSDK setupWithLicenseKey:kDemoAppLicenseKey error:&error];

NSString *licenseKey = kDemoAppLicenseKey_Bundle;
[AnylineSDK setupWithLicenseKey:licenseKey error:&error];
if (error) {
NSLog(@"Error with Anyline license: %@",error.localizedDescription);
return NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ @interface ALScriptSelectionViewController ()

@implementation ALScriptSelectionViewController

+ (UIBarButtonItem*)createBarButtonForScriptSelection:(UIViewController *)viewController {

+ (UIBarButtonItem *)createBarButtonForScriptSelection:(UIViewController *)viewController {
UIButton *scriptSelectionButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];

[scriptSelectionButton setContentMode:UIViewContentModeScaleAspectFit];
[scriptSelectionButton.imageView setContentMode:UIViewContentModeScaleAspectFit];
[scriptSelectionButton setImage:[UIImage imageNamed:@"script_selection"] forState:UIControlStateNormal];
Expand Down Expand Up @@ -116,17 +114,17 @@ - (void)viewDidLoad {
[self setArabicScriptButtonActions];
}

-(void)viewDidDisappear:(BOOL)animated {
- (void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
}


-(void)setLatinScriptButtonActions {
- (void)setLatinScriptButtonActions {
[self.latinScriptButton addTarget:self action:@selector(selectedScriptSelected:) forControlEvents:UIControlEventTouchUpInside];
[self.latinScriptButton addTarget:self action:@selector(setUnselectedButton:) forControlEvents:UIControlEventTouchDown];
}

-(void)setArabicScriptButtonActions {
- (void)setArabicScriptButtonActions {
[self.arabicScriptbutton addTarget:self action:@selector(selectedScriptSelected:) forControlEvents:UIControlEventTouchUpInside];
[self.arabicScriptbutton addTarget:self action:@selector(setUnselectedButton:) forControlEvents:UIControlEventTouchDown];
}
Expand All @@ -135,12 +133,12 @@ - (void)setUnselectedButton:(UIButton*)sender {
[sender setSelected:NO];
}

-(void)selectedScriptSelected:(UIButton*)sender {
- (void)selectedScriptSelected:(UIButton*)sender {
[sender setSelected:YES];
[self dismissViewControllerAnimated:YES completion:nil];
}

-(void)changeScript:(BOOL)isArabic {
- (void)changeScript:(BOOL)isArabic {
if (self.delegate) {
[self.delegate changeScript:isArabic];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

#import "ALBaseGridCollectionViewController.h"
#import <Anyline/Anyline.h>
#import "ALGridCollectionViewCell.h"
#import "ALMeterCollectionViewController.h"
#import "ALGridCollectionViewController.h"
Expand All @@ -19,7 +20,8 @@
#import "NSUserDefaults+ALExamplesAdditions.h"
#import "UIColor+ALExamplesAdditions.h"
#import "ALHeaderCollectionReusableView.h"
#import "ALUniversalIDScanViewControllerFrontAndBack.h"
#import "ALUniversalIDScanViewController.h"
#import "ALLicensePlateScanViewController.h"

NSString * const reuseIdentifier = @"gridCell";
NSString * const viewControllerIdentifier = @"gridViewController";
Expand Down Expand Up @@ -272,8 +274,12 @@ - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPa
#pragma mark - Utility Methods

- (CGSize)collectionView:(UICollectionView *)collectionView
layout:(UICollectionViewLayout*)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
return [self headerSize];
layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section {
if ([self.exampleManager numberOfSections] > 1) {
return [self headerSize];
} else {
return CGSizeZero;
}
}

- (CGSize)collectionView:(UICollectionView *)collectionView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#import "ALAutoAnalogDigitalMeterScanViewController.h"
#import "ALDialMeterScanViewController.h"

#import "ALMultiformatBarcodeScanViewController.h"
#import "ALBarcodeScanViewController.h"
#import "ALMRZScanViewController.h"
#import "ALIBANScanViewController.h"
#import "ALVoucherCodeScanViewController.h"
Expand All @@ -20,7 +20,7 @@
#import "ALRBScanViewController.h"
#import "ALScrabbleScanViewController.h"
#import "ALDocumentScanViewController.h"
#import "ALLicensePlateViewController.h"
#import "ALLicensePlateScanViewController.h"

NSString * const processTitle = @"Processes";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
#import "ALExample.h"
#import "ALExampleManager.h"

extern NSString * const kDriversLicenseTitleString;
extern NSString * const kIDCardTitleString;

@interface ALIdentityDocumentsExampleManager : ALExampleManager

@end
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
#import "ALMeterCollectionViewController.h"
#import "ALPDF417ScanViewController.h"
#import "ALNFCScanViewController.h"

#import "ALUniversalIDScanViewController.h"
#import "ALUniversalIDScanViewControllerFrontAndBack.h"

NSString * const kDriversLicenseTitleString = @"Driver's License";
NSString * const kIDCardTitleString = @"ID Card";
NSString * const kPassportVisaTitleString = @"Passport / Visa";

@interface ALIdentityDocumentsExampleManager ()

Expand All @@ -46,18 +40,18 @@ - (void)initExampleData {

ALExample *universalID = [[ALExample alloc] initWithName:NSLocalizedString(@"Universal ID", nil)
image:[UIImage imageNamed:@"tile_universalid"]
viewController:[ALUniversalIDScanViewControllerFrontAndBack class]];
viewController:[ALUniversalIDScanViewController class]];

self.canUpdate = YES;

ALExample *drivingLicenseScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Driver's License", nil)
image:[UIImage imageNamed:@"tile_driverslicense"]
viewController:[ALUniversalIDScanViewControllerFrontAndBack class]
viewController:[ALUniversalIDScanViewController class]
title:kDriversLicenseTitleString];

ALExample *idCardScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"ID Card", nil)
image:[UIImage imageNamed:@"tile_idcard"]
viewController:[ALUniversalIDScanViewControllerFrontAndBack class]
viewController:[ALUniversalIDScanViewController class]
title:kIDCardTitleString];

ALExample *passportScanning = [[ALExample alloc] initWithName:NSLocalizedString(kPassportVisaTitleString, nil)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
//
// ALLicensePlateExampleManager.m
// AnylineExamples
//
// Created by Philipp Müller on 05/03/2021.
// Copyright © 2021 Anyline GmbH. All rights reserved.
//

#import "ALLicensePlateExampleManager.h"
#import "ALLicensePlateViewController.h"
#import "ALUSLicensePlateViewController.h"
#import "ALAFLicensePlateViewController.h"
#import "ALLicensePlateScanViewController.h"

@interface ALLicensePlateExampleManager ()

Expand All @@ -19,11 +9,11 @@ @interface ALLicensePlateExampleManager ()

@end


@implementation ALLicensePlateExampleManager

- (instancetype)init {
self = [super init];
if (self) {
if (self = [super init]) {
[self initExampleData];
}
return self;
Expand All @@ -33,17 +23,20 @@ - (void)initExampleData {
self.title = @"License Plate";

ALExample *licensePlateEU = [[ALExample alloc] initWithName:NSLocalizedString(@"EU License Plate", nil)
image:[UIImage imageNamed:@"tile_licenseplate_eu"]
viewController:[ALLicensePlateViewController class]];
ALExample *licensePlateUS = [[ALExample alloc] initWithName:NSLocalizedString(@"US License plate", nil)
image:[UIImage imageNamed:@"tile_licenseplate_us"]
viewController:[ALUSLicensePlateViewController class]];
ALExample *licensePlateAF = [[ALExample alloc] initWithName:NSLocalizedString(@"African License plate", nil)
image:[UIImage imageNamed:@"tile_licenseplate_eu"]
viewController:[ALLicensePlateScanViewController class]
title:@"EU License Plate"];
ALExample *licensePlateUS = [[ALExample alloc] initWithName:NSLocalizedString(@"US License Plate", nil)
image:[UIImage imageNamed:@"tile_licenseplate_us"]
viewController:[ALLicensePlateScanViewController class]
title:@"US License Plate"];
ALExample *licensePlateAF = [[ALExample alloc] initWithName:NSLocalizedString(@"African License Plate", nil)
image:[UIImage imageNamed:@"tile_licenseplate_af"]
viewController:[ALAFLicensePlateViewController class]];
viewController:[ALLicensePlateScanViewController class]
title:@"African License Plate"];
self.sectionNames = @[@"License Plate"];
self.examples = [@{
self.sectionNames[0] : @[licensePlateEU, licensePlateUS, licensePlateAF],
self.sectionNames[0] : @[ licensePlateEU, licensePlateUS, licensePlateAF ],
} mutableCopy];

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
#import "ALUniversalSerialNumberScanViewController.h"
#import "ALVINScanViewController.h"
#import "ALContainerScanViewController.h"
#import "ALVerticalContainerScanViewController.h"
#import "ALVehicleRegistrationCertificateViewController.h"
#import "ALVRCScanViewController.h"

NSString * const kVehicleRegistrationCertificate = @"Vehicle Registration Certificate";

Expand Down Expand Up @@ -54,9 +53,9 @@ - (void)initExampleData {
viewController:[CommercialTireIdViewController class] title:@"Commercial Tire Identification Number"];

ALExample *vehicleRegistrationCertificate = [[ALExample alloc] initWithName:NSLocalizedString(kVehicleRegistrationCertificate, nil)
image:[UIImage imageNamed:@""]
viewController:[ALVehicleRegistrationCertificateViewController class]
title:kVehicleRegistrationCertificate];
image:[UIImage imageNamed:@"vrc"]
viewController:[ALVRCScanViewController class]
title:kVehicleRegistrationCertificate];

self.sectionNames = @[@"Vehicle",];
self.examples = @{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
//
// ALExampleManager.m
// AnylineExamples
//
// Created by Philipp Müller on 21/11/2017.
// Copyright © 2017 Anyline GmbH. All rights reserved.
//

#import "ALMeterExampleManager.h"

//#import "ALAutoAnalogDigitalMeterScanViewController.h"
#import "ALDialMeterScanViewController.h"
#import "ALMeterSerialNumberScanViewController.h"
#import "CustomerSelfReadingViewController.h"
#import "WorkForceViewController.h"
#import "ALParallelMeterScanViewController.h"

#import "AnylineExamples-Swift.h"

@interface ALMeterExampleManager ()

Expand All @@ -36,24 +25,33 @@ - (instancetype)init {

- (void)initExampleData {
self.title = @"Meter Reading";
ALExample *autoAnalogDigitalMeterScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Analog / Digital", nil)
image:[UIImage imageNamed:@"analog digital"]
viewController:[ALParallelMeterScanViewController class]];

ALExample *dialMeterScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Dial", nil)
image:[UIImage imageNamed:@"dial meter"]
viewController:[ALDialMeterScanViewController class]];
ALExample *analogDigitalMeterScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Analog / Digital", nil)
image:[UIImage imageNamed:@"analog digital"]
viewController:[ALMeterScanViewController class]
title:@"Analog / Digital"];

ALExample *serialScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Serial Number", nil)
image:[UIImage imageNamed:@"serial number"]
viewController:[ALMeterSerialNumberScanViewController class]];
ALExample *dialMeterScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Dial", nil)
image:[UIImage imageNamed:@"dial meter"]
viewController:[ALMeterScanViewController class]
title:@"Dial Meter"];

// this is merely a parallel meter/barcode scanner, like with Analog/Digital, but using the now-defunct
// ALSerialNumber meter scan mode.
// ALExample *serialScanning = [[ALExample alloc] initWithName:NSLocalizedString(@"Serial Number", nil)
// image:[UIImage imageNamed:@"serial number"]
// viewController:[ALMeterSerialNumberScanViewController class]
// title:@"Serial Number"];

self.sectionNames = @[@"Meter Types"];
self.sectionNames = @[ @"Meter Types" ]; // TODO: not showing on bundle

self.examples = @{
self.sectionNames[0] : @[autoAnalogDigitalMeterScanning,
dialMeterScanning,
serialScanning]
};
self.sectionNames[0] : @[
analogDigitalMeterScanning,
dialMeterScanning,
// serialScanning
]
};
}

@end
Loading

0 comments on commit ff992e5

Please sign in to comment.