diff --git a/android/libs/x86_64/libiconv.so b/android/libs/x86_64/libiconv.so
new file mode 100644
index 0000000..10a5f4c
Binary files /dev/null and b/android/libs/x86_64/libiconv.so differ
diff --git a/android/libs/x86_64/libzbarjni.so b/android/libs/x86_64/libzbarjni.so
new file mode 100644
index 0000000..5537e03
Binary files /dev/null and b/android/libs/x86_64/libzbarjni.so differ
diff --git a/ios/CsZBar.m b/ios/CsZBar.m
index 45a15ab..a15f2b2 100644
--- a/ios/CsZBar.m
+++ b/ios/CsZBar.m
@@ -35,6 +35,24 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
#pragma mark - Plugin API
++ (UIView*) searchToolbarFrom:(UIView*) topView {
+ UIView* result = nil;
+ for (UIView* testView in topView.subviews) {
+ if([testView isKindOfClass:[UIToolbar class]]){
+ result = testView;
+ break;
+ } else {
+ if ([testView.subviews count] > 0){
+ result = [self searchToolbarFrom:testView];
+ if (result != nil){
+ break;
+ }
+ }
+ }
+ }
+ return result;
+};
+
- (void)scan: (CDVInvokedUrlCommand*)command;
{
if (self.scanInProgress) {
@@ -49,7 +67,7 @@ - (void)scan: (CDVInvokedUrlCommand*)command;
self.scanReader = [AlmaZBarReaderViewController new];
self.scanReader.readerDelegate = self;
- self.scanReader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationPortrait);
+ self.scanReader.supportedOrientationsMask = ZBarOrientationMask(UIInterfaceOrientationPortrait || UIDeviceOrientationLandscapeRight || UIDeviceOrientationLandscapeLeft);
// Get user parameters
NSDictionary *params = (NSDictionary*) [command argumentAtIndex:0];
@@ -72,16 +90,22 @@ - (void)scan: (CDVInvokedUrlCommand*)command;
}
// Hack to hide the bottom bar's Info button... originally based on http://stackoverflow.com/a/16353530
- NSInteger infoButtonIndex;
- if ([[[UIDevice currentDevice] systemVersion] compare:@"10.0" options:NSNumericSearch] != NSOrderedAscending) {
- infoButtonIndex = 1;
- } else {
- infoButtonIndex = 3;
+
+ UIView* testView = self.scanReader.view;
+ UIView* toolBar = [[self class] searchToolbarFrom:testView];
+
+ for (UIBarButtonItem* item in ((UIToolbar*)toolBar).items) {
+ if (item.customView != nil){
+ if([item.customView isKindOfClass:[UIButton class]]){
+ UIButton* but = (UIButton*)item.customView;
+ if (but.buttonType == UIButtonTypeInfoLight
+ || but.buttonType == UIButtonTypeInfoDark){
+ but.hidden = YES;
+ }
+ }
+ }
}
- UIView *infoButton = [[[[[self.scanReader.view.subviews objectAtIndex:2] subviews] objectAtIndex:0] subviews] objectAtIndex:infoButtonIndex];
- [infoButton setHidden:YES];
- //UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem]; [button setTitle:@"Press Me" forState:UIControlStateNormal]; [button sizeToFit]; [self.view addSubview:button];
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGFloat screenWidth = screenRect.size.width;
CGFloat screenHeight = screenRect.size.height;
diff --git a/plugin.xml b/plugin.xml
index dd43518..f8f81c5 100644
--- a/plugin.xml
+++ b/plugin.xml
@@ -57,6 +57,8 @@
s
+
+