Запускается ZBAR сканнер в iOS версии приложения

This commit is contained in:
Guest Developer
2017-07-13 17:03:49 +03:00
parent 715c9bf3bd
commit b0ac74ea10
32 changed files with 4747 additions and 12 deletions

View File

@@ -1,12 +1,29 @@
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "Runner-Swift.h"
#import "ZBarSDK.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[GeneratedPluginRegistrant registerWithRegistry:self];
// Override point for customization after application launch.
return [super application:application didFinishLaunchingWithOptions:launchOptions];
[GeneratedPluginRegistrant registerWithRegistry:self];
FlutterViewController* controller = (FlutterViewController*)self.window.rootViewController;
FlutterMethodChannel* scannerChannel = [FlutterMethodChannel
methodChannelWithName:@"com.yourcompany.checker/scanner"
binaryMessenger:controller];
[scannerChannel setMethodCallHandler:^(FlutterMethodCall* call, FlutterResult result) {
ScannerViewController *modalViewController = [ScannerViewController new];
[controller presentViewController:modalViewController animated:YES completion:nil]; }];
return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
- (void) showScanner {
}
@end