Merge changes to default branch

Hg: changed android/app/src/main/java/com/dinect/checker/AbstractScannerActivity.java
This commit is contained in:
Ivan Murashov
2018-02-12 08:06:50 +03:00
83 changed files with 1035 additions and 1573 deletions

View File

@@ -4,7 +4,6 @@
.svn/
.DS_Store
*.swp
profile
DerivedData/
@@ -12,30 +11,22 @@ build/
GeneratedPluginRegistrant.h
GeneratedPluginRegistrant.m
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
xcuserdata
Runner.xcodeproj/xcuserdata
Runner.xcworkspace/xcuserdata
*.moved-aside
*.pyc
*sync/
Icon?
.tags*
/Flutter/app.flx
/Flutter/app.zip
/Flutter/App.framework
/Flutter/Flutter.framework
/Flutter/Generated.xcconfig
/ServiceDefinitions.json
Flutter/app.flx
Flutter/app.zip
Flutter/App.framework
Flutter/Flutter.framework
Flutter/Generated.xcconfig
ServiceDefinitions.json
Pods/

Binary file not shown.

View File

@@ -8,6 +8,26 @@
/**
BREAKING CHANGES:
January 15, 2018: Marked "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot" as unavailable following the
deprecation from December 11, 2017. Scheduled to be removed on February
19, 2018.
January 09, 2018: Deprecated "FlutterStandardBigInteger" and its use in
"FlutterStandardMessageCodec" and "FlutterStandardMethodCodec". Scheduled to
be marked as unavailable once the deprecation has been available on the
flutter/flutter alpha branch for four weeks. "FlutterStandardBigInteger" was
needed because the Dart 1.0 int type had no size limit. With Dart 2.0, the
int type is a fixed-size, 64-bit signed integer. If you need to communicate
larger integers, use NSString encoding instead.
December 11, 2017: Deprecated "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot" and scheculed the same to be marked as
unavailable on January 15, 2018. Instead, "initWithFlutterAssets" and
"initWithFlutterAssetsWithScriptSnapshot" should be used. The reason for this
change is that the FLX archive will be deprecated and replaced with a flutter
assets directory containing the same files as the FLX did.
November 29, 2017: Added a BREAKING CHANGES section.
*/

View File

@@ -91,7 +91,6 @@ FLUTTER_EXPORT
- `nil` or `NSNull`
- `NSNumber` (including their representation of Boolean values)
- `FlutterStandardBigInteger`
- `NSString`
- `FlutterStandardTypedData`
- `NSArray` of supported values
@@ -101,11 +100,17 @@ FLUTTER_EXPORT
- `nil` or `NSNull`: null
- `NSNumber`: `bool`, `int`, or `double`, depending on the contained value.
- `FlutterStandardBigInteger`: `int`
- `NSString`: `String`
- `FlutterStandardTypedData`: `Uint8List`, `Int32List`, `Int64List`, or `Float64List`
- `NSArray`: `List`
- `NSDictionary`: `Map`
Support for `FlutterStandardBigInteger` has been deprecated on 2018-01-09 to be
made unavailable four weeks after this change is available on the Flutter alpha
branch. `FlutterStandardBigInteger` were needed because the Dart 1.0 `int` type
had no size limit. With Dart 2.0, the `int` type is a fixed-size, 64-bit signed
integer. If you need to communicate larger integers, use `NSString` encoding
instead.
*/
FLUTTER_EXPORT
@interface FlutterStandardMessageCodec : NSObject<FlutterMessageCodec>
@@ -253,6 +258,13 @@ FLUTTER_EXPORT
and `FlutterStandardMethodCodec`.
*/
FLUTTER_EXPORT
FLUTTER_DEPRECATED(
"Deprecated on 2018-01-09 to be made unavailable four weeks after the "
"deprecation is available on the flutter/flutter alpha branch. "
"FlutterStandardBigInteger was needed because the Dart 1.0 int type had no "
"size limit. With Dart 2.0, the int type is a fixed-size, 64-bit signed "
"integer. If you need to communicate larger integers, use NSString encoding "
"instead.")
@interface FlutterStandardBigInteger : NSObject
/**
Creates a `FlutterStandardBigInteger` from a hexadecimal representation.

View File

@@ -16,9 +16,22 @@ FLUTTER_EXPORT
- (instancetype)initWithFLXArchive:(NSURL*)archiveURL
dartMain:(NSURL*)dartMainURL
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER;
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER
FLUTTER_UNAVAILABLE(
"This initializer is no longer available. See the deprecation message from "
"December 11, 2017 in Flutter.h. Instead, use [initWithFlutterAssets].");
- (instancetype)initWithFLXArchiveWithScriptSnapshot:(NSURL*)archiveURL NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithFLXArchiveWithScriptSnapshot:(NSURL*)archiveURL NS_DESIGNATED_INITIALIZER
FLUTTER_UNAVAILABLE(
"This initializer is no longer available. See the deprecation message from "
"December 11, 2017 in Flutter.h. Instead, use [initWithFlutterAssetsWithScriptSnapshot].");
- (instancetype)initWithFlutterAssets:(NSURL*)flutterAssetsURL
dartMain:(NSURL*)dartMainURL
packages:(NSURL*)dartPackages NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithFlutterAssetsWithScriptSnapshot:(NSURL*)flutterAssetsURL
NS_DESIGNATED_INITIALIZER;
- (instancetype)initFromDefaultSourceForConfiguration;

View File

@@ -127,7 +127,8 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (BOOL)application:(UIApplication*)application
performActionForShortcutItem:(UIApplicationShortcutItem*)shortcutItem
completionHandler:(void (^)(BOOL succeeded))completionHandler;
completionHandler:(void (^)(BOOL succeeded))completionHandler
API_AVAILABLE(ios(9.0));
@end

View File

@@ -1,9 +1,9 @@
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/dinect/projects/flutter
FLUTTER_APPLICATION_PATH=/Users/dinect/projects/checker
FLUTTER_ROOT=/Users/kifio/flutter
FLUTTER_APPLICATION_PATH=/Users/kifio/Desktop/FlutterProjects/checker
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_MODE=release
FLUTTER_BUILD_MODE=debug
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
FLUTTER_FRAMEWORK_DIR=/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
FLUTTER_FRAMEWORK_DIR=/Users/kifio/flutter/bin/cache/artifacts/engine/ios
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"

Binary file not shown.

View File

@@ -1,5 +1,6 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
pod 'ZXingObjC', '~> 3.2.2'
if ENV['FLUTTER_FRAMEWORK_DIR'] == nil
abort('Please set FLUTTER_FRAMEWORK_DIR to the directory containing Flutter.framework')

View File

@@ -10,30 +10,35 @@ PODS:
- sqflite (0.0.1):
- Flutter
- FMDB
- ZXingObjC (3.2.2):
- ZXingObjC/All (= 3.2.2)
- ZXingObjC/All (3.2.2)
DEPENDENCIES:
- Flutter (from `/Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release`)
- image_picker (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios`)
- path_provider (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios`)
- sqflite (from `/Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2/ios`)
- Flutter (from `/Users/kifio/flutter/bin/cache/artifacts/engine/ios`)
- image_picker (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios`)
- path_provider (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios`)
- sqflite (from `/Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2+2/ios`)
- ZXingObjC (~> 3.2.2)
EXTERNAL SOURCES:
Flutter:
:path: /Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
:path: /Users/kifio/flutter/bin/cache/artifacts/engine/ios
image_picker:
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios
path_provider:
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/path_provider-0.2.2/ios
sqflite:
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2/ios
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.6.2+2/ios
SPEC CHECKSUMS:
Flutter: d674e78c937094a75ac71dd77e921e840bea3dbf
Flutter: 7eb41cd1fd524b90d7f22bceb20da2c39338b089
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
image_picker: a211f28b95a560433c00f5cd3773f4710a20404d
path_provider: f96fff6166a8867510d2c25fdcc346327cc4b259
sqflite: 8e2d9fe1e7cdc95d4d537fc7eb2d23c8dc428e3c
image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
sqflite: edb0e4df7640c26fea6a107c21ed1542219e761a
ZXingObjC: 2c95a0dc52daac69b23ec78fad8fa2fec05f8981
PODFILE CHECKSUM: 351e02e34b831289961ec3558a535cbd2c4965d2
PODFILE CHECKSUM: 9f4cf0c4c102f6176b37e2c4c913e0544612cec5
COCOAPODS: 1.4.0.beta.2
COCOAPODS: 1.4.0

View File

@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
ACE8612B1F9F745B006FEF38 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
ACE8612C1F9F745B006FEF38 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
ACE8612D1F9F745B006FEF38 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
@@ -20,22 +21,15 @@
ACE861361F9F745B006FEF38 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB311F1792570053B6EA /* AVFoundation.framework */; };
ACE861371F9F745B006FEF38 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
ACE861381F9F745B006FEF38 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
ACE861391F9F745B006FEF38 /* libzbar.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ACE103AB1F8FCC6000D17794 /* libzbar.a */; };
ACE8613A1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 28B464359F9DDCC3EF756D7D /* libPods-Runner.a */; };
ACE8613B1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC45BF661F9E3F97009713E2 /* libPods-Runner.a */; };
ACE8613C1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC45BF661F9E3F97009713E2 /* libPods-Runner.a */; };
ACE8613E1F9F745B006FEF38 /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; };
ACE8613F1F9F745B006FEF38 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
ACE861401F9F745B006FEF38 /* Generated.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB31CF90195004384FC /* Generated.xcconfig */; };
ACE861411F9F745B006FEF38 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
ACE861421F9F745B006FEF38 /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
ACE861431F9F745B006FEF38 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
ACE861441F9F745B006FEF38 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
ACE861461F9F745B006FEF38 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
ACE861471F9F745B006FEF38 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
AFFEFA1AD31BC8D9EA04CFCB /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC45BF661F9E3F97009713E2 /* libPods-Runner.a */; };
BAE7FF4D875B996672385844 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC45BF661F9E3F97009713E2 /* libPods-Runner.a */; };
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378261FAA1A9400D5DBA9 /* flutter_assets */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
@@ -66,8 +60,8 @@
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
2D5378261FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
28B464359F9DDCC3EF756D7D /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
32DA147B1FBC3DCE008F0388 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
@@ -85,27 +79,6 @@
AC45BF661F9E3F97009713E2 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
AC45BF911F9E408E009713E2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = /Users/ntrlab/semyon/apps/checker/ios/Runner/Info.plist; sourceTree = "<absolute>"; };
AC73A4241F9F7F920026EBA4 /* Dinect.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Dinect.plist; path = /Users/ntrlab/semyon/apps/checker/ios/Runner/Dinect.plist; sourceTree = "<absolute>"; };
ACE103AB1F8FCC6000D17794 /* libzbar.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libzbar.a; path = ZBarSDK/libzbar.a; sourceTree = "<group>"; };
ACE103AD1F8FCC6F00D17794 /* zbar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zbar.h; path = ZBarSDK/Headers/zbar.h; sourceTree = "<group>"; };
ACE103AE1F8FCC6F00D17794 /* ZBarCaptureReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarCaptureReader.h; path = ZBarSDK/Headers/ZBarCaptureReader.h; sourceTree = "<group>"; };
ACE103AF1F8FCC6F00D17794 /* ZBarReaderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarReaderViewController.h; path = ZBarSDK/Headers/ZBarReaderViewController.h; sourceTree = "<group>"; };
ACE103B01F8FCC6F00D17794 /* ZBarImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarImage.h; path = ZBarSDK/Headers/ZBarImage.h; sourceTree = "<group>"; };
ACE103B11F8FCC7000D17794 /* ZBarCameraSimulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarCameraSimulator.h; path = ZBarSDK/Headers/ZBarCameraSimulator.h; sourceTree = "<group>"; };
ACE103B21F8FCC7000D17794 /* ZBarReaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarReaderView.h; path = ZBarSDK/Headers/ZBarReaderView.h; sourceTree = "<group>"; };
ACE103B31F8FCC7000D17794 /* ZBarSDK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarSDK.h; path = ZBarSDK/Headers/ZBarSDK.h; sourceTree = "<group>"; };
ACE103B41F8FCC7000D17794 /* ZBarHelpController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarHelpController.h; path = ZBarSDK/Headers/ZBarHelpController.h; sourceTree = "<group>"; };
ACE103B51F8FCC7000D17794 /* ZBarImageScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarImageScanner.h; path = ZBarSDK/Headers/ZBarImageScanner.h; sourceTree = "<group>"; };
ACE103B61F8FCC7100D17794 /* ZBarReaderController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarReaderController.h; path = ZBarSDK/Headers/ZBarReaderController.h; sourceTree = "<group>"; };
ACE103B71F8FCC7100D17794 /* ZBarSymbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ZBarSymbol.h; path = ZBarSDK/Headers/ZBarSymbol.h; sourceTree = "<group>"; };
ACE103BE1F8FCD1400D17794 /* Window.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Window.h; path = ZBarSDK/Headers/zbar/Window.h; sourceTree = "<group>"; };
ACE103BF1F8FCD1500D17794 /* Decoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoder.h; path = ZBarSDK/Headers/zbar/Decoder.h; sourceTree = "<group>"; };
ACE103C01F8FCD1500D17794 /* Processor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Processor.h; path = ZBarSDK/Headers/zbar/Processor.h; sourceTree = "<group>"; };
ACE103C11F8FCD1500D17794 /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Exception.h; path = ZBarSDK/Headers/zbar/Exception.h; sourceTree = "<group>"; };
ACE103C21F8FCD1500D17794 /* Symbol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Symbol.h; path = ZBarSDK/Headers/zbar/Symbol.h; sourceTree = "<group>"; };
ACE103C31F8FCD1500D17794 /* Image.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Image.h; path = ZBarSDK/Headers/zbar/Image.h; sourceTree = "<group>"; };
ACE103C41F8FCD1500D17794 /* Video.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Video.h; path = ZBarSDK/Headers/zbar/Video.h; sourceTree = "<group>"; };
ACE103C51F8FCD1500D17794 /* ImageScanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ImageScanner.h; path = ZBarSDK/Headers/zbar/ImageScanner.h; sourceTree = "<group>"; };
ACE103C61F8FCD1500D17794 /* Scanner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scanner.h; path = ZBarSDK/Headers/zbar/Scanner.h; sourceTree = "<group>"; };
ACE861531F9F745B006FEF38 /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
BBA9BAFD1F176DD10053B6EA /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
BBA9BAFE1F176DD10053B6EA /* ScannerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScannerViewController.swift; sourceTree = "<group>"; };
@@ -132,12 +105,8 @@
ACE861361F9F745B006FEF38 /* AVFoundation.framework in Frameworks */,
ACE861371F9F745B006FEF38 /* Flutter.framework in Frameworks */,
ACE861381F9F745B006FEF38 /* App.framework in Frameworks */,
ACE861391F9F745B006FEF38 /* libzbar.a in Frameworks */,
ACE8613A1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */,
ACE8613B1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */,
ACE8613C1F9F745B006FEF38 /* libPods-Runner.a in Frameworks */,
BAE7FF4D875B996672385844 /* libPods-Runner.a in Frameworks */,
AFFEFA1AD31BC8D9EA04CFCB /* libPods-Runner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -154,6 +123,7 @@
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
9740EEB71CF902C7004384FC /* app.flx */,
3B80C3931E831B6300D905FE /* App.framework */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
@@ -161,7 +131,6 @@
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
2D5378261FAA1A9400D5DBA9 /* flutter_assets */,
);
name = Flutter;
sourceTree = "<group>";
@@ -169,7 +138,6 @@
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
ACE103BB1F8FCCA500D17794 /* ZBarSDK */,
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
@@ -214,50 +182,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
ACE103BB1F8FCCA500D17794 /* ZBarSDK */ = {
isa = PBXGroup;
children = (
ACE103AB1F8FCC6000D17794 /* libzbar.a */,
ACE103BC1F8FCCD000D17794 /* Headers */,
);
name = ZBarSDK;
sourceTree = "<group>";
};
ACE103BC1F8FCCD000D17794 /* Headers */ = {
isa = PBXGroup;
children = (
ACE103BD1F8FCCF300D17794 /* zbar */,
ACE103AD1F8FCC6F00D17794 /* zbar.h */,
ACE103AE1F8FCC6F00D17794 /* ZBarCaptureReader.h */,
ACE103AF1F8FCC6F00D17794 /* ZBarReaderViewController.h */,
ACE103B31F8FCC7000D17794 /* ZBarSDK.h */,
ACE103B71F8FCC7100D17794 /* ZBarSymbol.h */,
ACE103B11F8FCC7000D17794 /* ZBarCameraSimulator.h */,
ACE103B41F8FCC7000D17794 /* ZBarHelpController.h */,
ACE103B01F8FCC6F00D17794 /* ZBarImage.h */,
ACE103B51F8FCC7000D17794 /* ZBarImageScanner.h */,
ACE103B61F8FCC7100D17794 /* ZBarReaderController.h */,
ACE103B21F8FCC7000D17794 /* ZBarReaderView.h */,
);
name = Headers;
sourceTree = "<group>";
};
ACE103BD1F8FCCF300D17794 /* zbar */ = {
isa = PBXGroup;
children = (
ACE103BF1F8FCD1500D17794 /* Decoder.h */,
ACE103C11F8FCD1500D17794 /* Exception.h */,
ACE103C31F8FCD1500D17794 /* Image.h */,
ACE103C51F8FCD1500D17794 /* ImageScanner.h */,
ACE103C01F8FCD1500D17794 /* Processor.h */,
ACE103C61F8FCD1500D17794 /* Scanner.h */,
ACE103C21F8FCD1500D17794 /* Symbol.h */,
ACE103C41F8FCD1500D17794 /* Video.h */,
ACE103BE1F8FCD1400D17794 /* Window.h */,
);
name = zbar;
sourceTree = "<group>";
};
BBA9BB001F1786510053B6EA /* Frameworks */ = {
isa = PBXGroup;
children = (
@@ -308,11 +232,11 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 0830;
LastUpgradeCheck = 0920;
ORGANIZATIONNAME = "The Chromium Authors";
TargetAttributes = {
ACE861271F9F745B006FEF38 = {
DevelopmentTeam = 926V94K5Q8;
DevelopmentTeam = SU33AJBF5T;
ProvisioningStyle = Automatic;
SystemCapabilities = {
com.apple.Push = {
@@ -345,14 +269,12 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
ACE8613E1F9F745B006FEF38 /* app.flx in Resources */,
ACE8613F1F9F745B006FEF38 /* LaunchScreen.storyboard in Resources */,
ACE861401F9F745B006FEF38 /* Generated.xcconfig in Resources */,
ACE861411F9F745B006FEF38 /* AppFrameworkInfo.plist in Resources */,
ACE861421F9F745B006FEF38 /* Debug.xcconfig in Resources */,
ACE861431F9F745B006FEF38 /* Assets.xcassets in Resources */,
ACE861441F9F745B006FEF38 /* Main.storyboard in Resources */,
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -412,7 +334,7 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../../../flutter/bin/cache/artifacts/engine/ios-release/Flutter.framework",
"${PODS_ROOT}/../../../../../flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
@@ -484,14 +406,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -532,14 +460,20 @@
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -559,6 +493,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
@@ -569,12 +504,6 @@
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ARCHS = (
"$(ARCHS_STANDARD)",
arm7s,
armv7,
arm64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@@ -582,7 +511,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
DEVELOPMENT_TEAM = SU33AJBF5T;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -593,7 +522,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
"$(PROJECT_DIR)/ZBarSDK",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.autoclub.app;
@@ -613,12 +541,6 @@
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ARCHS = (
"$(ARCHS_STANDARD)",
arm7s,
armv7,
arm64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
@@ -626,7 +548,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
DEVELOPMENT_TEAM = SU33AJBF5T;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -637,7 +559,6 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
"$(PROJECT_DIR)/ZBarSDK",
);
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.autoclub.app;
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildLocationStyle</key>
<string>UseTargetSettings</string>
</dict>
</plist>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>ACE861271F9F745B006FEF38</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Autobonus copy.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
<key>Dinect copy.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>5</integer>
</dict>
<key>Runner copy.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>13</integer>
</dict>
<key>Runner.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>97C146ED1CF9000F007C117D</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF1B1F9E386C009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF691F9E408E009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC45BF921F9E574C009713E2</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC73A3CE1F9F79760026EBA4</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>AC73A3F61F9F7F910026EBA4</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>ACE860F91F9F716A006FEF38</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>ACE861271F9F745B006FEF38</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Runner.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array/>
</plist>

View File

@@ -1,151 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "534682467.345685"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "78"
endingLineNumber = "78"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "534682467.346198"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "10"
endingLineNumber = "10"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "534682467.346423"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "13"
endingLineNumber = "13"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "534682467.34663"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "15"
endingLineNumber = "15"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/AppDelegate.m"
timestampString = "534682467.346835"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "9"
endingLineNumber = "9"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/ScannerViewController.swift"
timestampString = "533143176.371374"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "88"
endingLineNumber = "88"
landmarkName = "viewDidLoad()"
landmarkType = "7">
<Locations>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "Runner.ScannerViewController.imagePickerController(__ObjC.UIImagePickerController, didFinishPickingMediaWithInfo: Swift.Dictionary&lt;Swift.String, Any&gt;) -&gt; ()"
moduleName = "Runner"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ntrlab/semyon/apps/checker/ios/Runner/ScannerViewController.swift"
timestampString = "530035394.220038"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
endingLineNumber = "48"
offsetFromSymbolStart = "1112">
</Location>
<Location
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
symbolName = "closure #1 () -&gt; () in Runner.ScannerViewController.imagePickerController(__ObjC.UIImagePickerController, didFinishPickingMediaWithInfo: Swift.Dictionary&lt;Swift.String, Any&gt;) -&gt; ()"
moduleName = "Runner"
usesParentBreakpointCondition = "Yes"
urlString = "file:///Users/ntrlab/semyon/apps/checker/ios/Runner/ScannerViewController.swift"
timestampString = "530035394.222527"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "49"
endingLineNumber = "49"
offsetFromSymbolStart = "28">
</Location>
</Locations>
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Runner/ScannerViewController.swift"
timestampString = "533143176.371475"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "89"
endingLineNumber = "89"
landmarkName = "viewDidLoad()"
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>

View File

@@ -1,8 +1,6 @@
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "Autobonus-Swift.h"
#import "ZBarSDK.h"
@implementation AppDelegate
@@ -90,14 +88,9 @@
} else if ([@"getCurrency" isEqualToString:call.method]) {
result(buildSettings[@"currency"]);
} else if ([@"startScanner" isEqualToString:call.method]) {
NSString *locale = call.arguments[@"locale"];
NSLog(@"locale is %@", locale);
ScannerViewController *modalViewController = [[ScannerViewController alloc] initWithLocale:locale];
ScannerViewController *modalViewController = [[ScannerViewController alloc] initWithStrings:call.arguments];
modalViewController.platformChannel = weekPlatformChannel;
[controller presentViewController:modalViewController animated:YES completion:nil];
// [weekPlatformChannel invokeMethod:(@"findUserAndPurchase") arguments: @[@"79039441628", @"phone"]];
} else if ([@"isOnline" isEqualToString:call.method]) {
result(@YES);
} else if ([@"getSupportPhone" isEqualToString:call.method]) {

View File

@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

View File

@@ -2,5 +2,4 @@
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "ZBarSDK.h"
#import "ZBarImageScanner.h"
#import "ZXingObjC/ZXingObjC.h"

View File

@@ -1,250 +1,308 @@
//
// ScannerViewController.swift
// Runner
//
// Created by Ivan Murashov on 13/07/2017.
// Copyright © 2017 The Chromium Authors. All rights reserved.
//
import UIKit
import Flutter
extension ZBarSymbolSet: Sequence {
//public typealias Element = ZBarSymbol
//public typealias Iterator = NSFastEnumerationIterator
public func makeIterator() -> NSFastEnumerationIterator {
return NSFastEnumerationIterator(self)
}
}
@objc class ScannerViewController: UIViewController, ZBarReaderDelegate, UITextFieldDelegate {
@objc class ScannerViewController: UIViewController, ZXCaptureDelegate, UITextFieldDelegate {
enum AppLocale {
case ru
case en
case ru
case en
}
enum ButtonState {
case card
case phone
var icon: UIImage {
switch self {
case .card: return UIImage(named: "card")!
case .phone: return UIImage(named: "phone")!
case .card: return UIImage(named: "card")!
case .phone: return UIImage(named: "phone")!
}
}
var searchType: String {
switch self {
case .card: return "card"
case .phone: return "phone"
case .card: return "card"
case .phone: return "phone"
}
}
}
var appLocale: AppLocale
// @IBOutlet weak var decodedLabel: UILabel!
private var captureSizeTransform: CGAffineTransform?
var buttonState: ButtonState = .card
var platformChannel: FlutterMethodChannel?
let readerViewController = ZBarReaderViewController()
// Квадрат для наведения на цель (надеюсь)
let scanRectView = UIView()
//Вьюшка для верхнего меню
let topView = UIView()
//Окно ввода кода
let textField = UITextField()
//Кнопка настроек
var settingButton: UIButton!
var strings = [String:String]()
required init?(coder aDecoder: NSCoder) {
self.appLocale = .en
super.init(coder: aDecoder)
}
init(locale: String) {
switch locale {
case "ru": self.appLocale = .ru; break
default: self.appLocale = .en
}
init(strings: [String: String]) {
super.init(nibName: nil, bundle: nil)
strings.forEach { (k,v) in self.strings[k] = v }
}
func getCardHint() -> String {
switch self.appLocale {
case .ru: return "Ввести номер карты"
default: return "Enter the barcode"
}
}
func getPhoneHint() -> String {
switch self.appLocale {
case .ru: return "Телефон 79XXXXXXXXX"
default: return "Phone 79XXXXXXXXX"
}
}
func getInputHint() -> String {
switch self.buttonState {
case .card: return self.getCardHint()
case .phone: return self.getPhoneHint()
case .card: return strings["enter_manual"]!
case .phone: return strings["enter_phone"]!
}
}
func getErrorTitle() -> String {
switch self.appLocale {
case .ru: return "Ошибка"
default: return "Error"
}
}
func getCardErrorText() -> String {
switch self.appLocale {
case .ru: return "Пользователь с номером карты %@ не найден"
default: return "User with card number %@ not found"
}
}
func getPhoneErrorText() -> String {
switch self.appLocale {
case .ru: return "Пользователь с номером телефона %@ не найден"
default: return "User with phone number %@ not found"
}
}
func getErrorText() -> String {
switch self.buttonState {
case .card: return self.getCardErrorText()
case .phone: return self.getPhoneErrorText()
case .card: return strings["user_card_not_found"]!
case .phone: return strings["user_phone_not_found"]!
}
}
func getDismissText() -> String {
switch self.appLocale {
case .ru: return "Скрыть"
default: return "Dismiss"
}
}
let capture: ZXCapture = ZXCapture()
override func viewDidLoad() {
super.viewDidLoad()
readerViewController.readerDelegate = self
readerViewController.readerView.zoom = 1.0
readerViewController.showsZBarControls = false
capture.camera = capture.back()
capture.focusMode = .continuousAutoFocus
view.layer.addSublayer((capture.layer)!)
view.addSubview(scanRectView)
settingButton = UIButton(type: .system)
settingButton.addTarget(self, action: #selector(ScannerViewController.buttonTouch), for: .touchUpInside)
self.addChildViewController(readerViewController)
self.view.addSubview(readerViewController.view)
readerViewController.didMove(toParentViewController: self)
readerViewController.view.addSubview(topView)
topView.addSubview(textField)
topView.addSubview(settingButton)
view.addSubview(topView)
view.bringSubview(toFront: topView)
textField.delegate = self
//textField.keyboardType = .numberPad
//Looks for single or multiple taps.
let tap = UITapGestureRecognizer(target: self, action: #selector(ScannerViewController.hideKeyboard))
readerViewController.view.addGestureRecognizer(tap)
view.addGestureRecognizer(tap)
settingButton.setImage(self.buttonState.icon, for: .normal)
textField.placeholder = self.getInputHint()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
topView.backgroundColor = UIColor.white
textField.borderStyle = .roundedRect
capture.delegate = self
applyOrientation()
}
override func viewWillLayoutSubviews() {
scanRectView.frame = view.bounds
topView.frame = CGRect(x: 0, y: 0, width: view.frame.size.width, height: 56)
settingButton.frame = CGRect(x: 8, y: 26, width: 20, height: 20)
textField.frame = CGRect(x: settingButton.frame.maxX + 8, y: 21,
width: view.frame.size.width - settingButton.frame.maxX - 16, height: 30)
}
func hideKeyboard() {
view.endEditing(false)
}
func buttonTouch(){
switch self.buttonState {
case .card: self.buttonState = .phone
case .phone: self.buttonState = .card
case .card: self.buttonState = .phone
case .phone: self.buttonState = .card
}
settingButton.setImage(self.buttonState.icon, for: .normal)
textField.placeholder = self.getInputHint()
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
sendResult(textField.text!)
return true
}
func sendResult(_ str: String) {
platformChannel?.invokeMethod("findUser", arguments: [str, buttonState.searchType], result: { (result: Any?) in
if result is FlutterError {
self.showErrorAlert(str)
} else {
self.dismiss(animated: true) {
self.platformChannel?.invokeMethod("purchase", arguments: [result, str])
}
}
print("result: \(result.debugDescription )")
})
}
func showErrorAlert(_ str: String) {
let alertController = UIAlertController(
title: self.getErrorTitle(),
title: strings["error"]!,
message: String(format: self.getErrorText(), str),
preferredStyle: UIAlertControllerStyle.alert
)
alertController.addAction(UIAlertAction(title: self.getDismissText(), style: UIAlertActionStyle.default,handler: nil))
// if let appDelegate = UIApplication.shared.delegate as? FlutterAppDelegate {
// appDelegate.window.rootViewController?.present(alertController, animated: true, completion: nil)
// }
alertController.addAction(UIAlertAction(title: strings["dismiss"]!, style: UIAlertActionStyle.default,handler: nil))
self.present(alertController, animated: true, completion: nil)
}
override func viewWillAppear(_ animated: Bool) {
topView.backgroundColor = UIColor.white
textField.borderStyle = .roundedRect
super.viewWillAppear(animated)
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
}
override func viewWillLayoutSubviews() {
readerViewController.view.frame = view.bounds
topView.frame = CGRect(x: 0, y: 0, width: readerViewController.view.frame.size.width, height: 40)
textField.frame = CGRect(x: settingButton.frame.maxX + 8 + 20 + 5, y: 5, width: readerViewController.view.frame.size.width - 50, height: 30)
settingButton.frame = CGRect(x: 8, y: 10, width: 20, height: 20)
}
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
guard let symbols = info[ZBarReaderControllerResults] as? ZBarSymbolSet else { return }
for symbol in symbols {
if let symbol = symbol as? ZBarSymbol, let data = symbol.data {
sendResult(data)
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
}
deinit {
capture.layer.removeFromSuperlayer()
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
coordinator.animate(alongsideTransition: {(_ context: UIViewControllerTransitionCoordinatorContext) -> Void in
}, completion: {(_ context: UIViewControllerTransitionCoordinatorContext) -> Void in
self.applyOrientation()
})
}
func applyOrientation() {
print("APPLY ORIENTATION")
let orientation: UIInterfaceOrientation = UIApplication.shared.statusBarOrientation
var scanRectRotation: Float
var captureRotation: Float
switch orientation {
case .portrait:
captureRotation = 0
scanRectRotation = 90
case .landscapeLeft:
captureRotation = 90
scanRectRotation = 180
case .landscapeRight:
captureRotation = 270
scanRectRotation = 0
case .portraitUpsideDown:
captureRotation = 180
scanRectRotation = 270
default:
captureRotation = 0
scanRectRotation = 90
}
applyRectOfInterest(orientation)
let transform = CGAffineTransform(rotationAngle: CGFloat(captureRotation / 180 * .pi))
capture.transform = transform
capture.rotation = CGFloat(scanRectRotation)
capture.layer.frame = view.frame
}
func applyRectOfInterest(_ orientation: UIInterfaceOrientation) {
var scaleVideo: CGFloat
var scaleVideoX: CGFloat
var scaleVideoY: CGFloat
var videoSizeX: CGFloat
var videoSizeY: CGFloat
var transformedVideoRect: CGRect = scanRectView.frame
videoSizeX = 720
videoSizeY = 1280
if UIInterfaceOrientationIsPortrait(orientation) {
scaleVideoX = view.frame.size.width / videoSizeX
scaleVideoY = view.frame.size.height / videoSizeY
scaleVideo = max(scaleVideoX, scaleVideoY)
if scaleVideoX > scaleVideoY {
transformedVideoRect.origin.y += (scaleVideo * videoSizeY - view.frame.size.height) / 2
}
else {
transformedVideoRect.origin.x += (scaleVideo * videoSizeX - view.frame.size.width) / 2
}
}
else {
scaleVideoX = view.frame.size.width / videoSizeY
scaleVideoY = view.frame.size.height / videoSizeX
scaleVideo = max(scaleVideoX, scaleVideoY)
if scaleVideoX > scaleVideoY {
transformedVideoRect.origin.y += (scaleVideo * videoSizeX - view.frame.size.height) / 2
}
else {
transformedVideoRect.origin.x += (scaleVideo * videoSizeY - view.frame.size.width) / 2
}
}
captureSizeTransform = CGAffineTransform(scaleX: 1 / scaleVideo, y: 1 / scaleVideo)
capture.scanRect = transformedVideoRect.applying(captureSizeTransform!)
}
// MARK: - Private Methods
func barcodeFormat(toString format: ZXBarcodeFormat) -> String {
switch format {
case kBarcodeFormatAztec:
return "Aztec"
case kBarcodeFormatCodabar:
return "CODABAR"
case kBarcodeFormatCode39:
return "Code 39"
case kBarcodeFormatCode93:
return "Code 93"
case kBarcodeFormatCode128:
return "Code 128"
case kBarcodeFormatDataMatrix:
return "Data Matrix"
case kBarcodeFormatEan8:
return "EAN-8"
case kBarcodeFormatEan13:
return "EAN-13"
case kBarcodeFormatITF:
return "ITF"
case kBarcodeFormatPDF417:
return "PDF417"
case kBarcodeFormatQRCode:
return "QR Code"
case kBarcodeFormatRSS14:
return "RSS 14"
case kBarcodeFormatRSSExpanded:
return "RSS Expanded"
case kBarcodeFormatUPCA:
return "UPCA"
case kBarcodeFormatUPCE:
return "UPCE"
case kBarcodeFormatUPCEANExtension:
return "UPC/EAN extension"
default:
return "Unknown"
}
}
// MARK: - ZXCaptureDelegate Methods
func captureResult(_ capture: ZXCapture, result: ZXResult) {
let inverse: CGAffineTransform = captureSizeTransform!.inverted()
var points = [AnyHashable]()
var location = ""
for resultPoint in result.resultPoints {
let p = resultPoint as! ZXResultPoint
let cgPoint = CGPoint(x: CGFloat(p.x), y: CGFloat(p.y))
var transformedPoint: CGPoint = cgPoint.applying(inverse)
transformedPoint = scanRectView.convert(transformedPoint, to: scanRectView.window)
let windowPointValue = NSValue(cgPoint: transformedPoint)
location = "\(location) (\(transformedPoint.x), \(transformedPoint.y))"
points.append(windowPointValue)
}
// We got a result. Display information about the result onscreen.
let formatString: String = barcodeFormat(toString: result.barcodeFormat)
sendResult(result.text)
print(result.text)
self.capture.stop()
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(2 * Double(NSEC_PER_SEC)) / Double(NSEC_PER_SEC), execute: {() -> Void in
self.capture.start()
})
}
}