iOS crypto target

This commit is contained in:
Ivan Murashov
2018-03-11 01:40:57 +03:00
parent cae46b60f9
commit c229ea8c9e
41 changed files with 811 additions and 192 deletions

View File

@@ -0,0 +1,53 @@
<?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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Dinect Crypto</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>checker</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSCameraUsageDescription</key>
<string>Для работы сканнера штрихкодов</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>Для работы сканнера штрихкодов</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
</dict>
</plist>

Binary file not shown.

View File

@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"

View File

@@ -8,6 +8,9 @@
/**
BREAKING CHANGES:
February 28, 2018: Removed "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot".
January 15, 2018: Marked "initWithFLXArchive" and
"initWithFLXArchiveWithScriptSnapshot" as unavailable following the
deprecation from December 11, 2017. Scheduled to be removed on February

View File

@@ -14,18 +14,6 @@ FLUTTER_EXPORT
- (instancetype)initWithPrecompiledDartBundle:(NSBundle*)bundle NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithFLXArchive:(NSURL*)archiveURL
dartMain:(NSURL*)dartMainURL
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
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;

View File

@@ -1,9 +1,8 @@
// 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
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
FLUTTER_FRAMEWORK_DIR=/Users/kifio/flutter/bin/cache/artifacts/engine/ios

View File

@@ -1 +1,2 @@
#include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"

Binary file not shown.

View File

@@ -3,8 +3,6 @@ PODS:
- FMDB (2.7.2):
- FMDB/standard (= 2.7.2)
- FMDB/standard (2.7.2)
- image_picker (0.0.1):
- Flutter
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
@@ -15,26 +13,22 @@ PODS:
- 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+2/ios`)
- Flutter (from `/Users/kifio/flutter/bin/cache/artifacts/engine/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.8.2/ios`)
- ZXingObjC (~> 3.2.2)
EXTERNAL SOURCES:
Flutter:
:path: /Users/dinect/projects/flutter/bin/cache/artifacts/engine/ios-release
image_picker:
:path: /Users/dinect/.pub-cache/hosted/pub.dartlang.org/image_picker-0.1.5/ios
:path: /Users/kifio/flutter/bin/cache/artifacts/engine/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+2/ios
:path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.2/ios
SPEC CHECKSUMS:
Flutter: 7eb41cd1fd524b90d7f22bceb20da2c39338b089
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
sqflite: edb0e4df7640c26fea6a107c21ed1542219e761a
ZXingObjC: 2c95a0dc52daac69b23ec78fad8fa2fec05f8981

View File

@@ -31,6 +31,27 @@
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, ); }; };
FB862E6620548D6C00C04986 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
FB862E6720548D6C00C04986 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
FB862E6820548D6C00C04986 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
FB862E6920548D6C00C04986 /* ScannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA9BAFE1F176DD10053B6EA /* ScannerViewController.swift */; };
FB862E6B20548D6C00C04986 /* libiconv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB601F179D270053B6EA /* libiconv.tbd */; };
FB862E6C20548D6C00C04986 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB3B1F1792A90053B6EA /* QuartzCore.framework */; };
FB862E6D20548D6C00C04986 /* CoreVideo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB391F17927C0053B6EA /* CoreVideo.framework */; };
FB862E6E20548D6C00C04986 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB371F1792730053B6EA /* CoreAudio.framework */; };
FB862E6F20548D6C00C04986 /* CoreMedia.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB351F1792690053B6EA /* CoreMedia.framework */; };
FB862E7020548D6C00C04986 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB331F17925F0053B6EA /* CoreGraphics.framework */; };
FB862E7120548D6C00C04986 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BBA9BB311F1792570053B6EA /* AVFoundation.framework */; };
FB862E7220548D6C00C04986 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
FB862E7320548D6C00C04986 /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
FB862E7520548D6C00C04986 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
FB862E7620548D6C00C04986 /* app.flx in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB71CF902C7004384FC /* app.flx */; };
FB862E7720548D6C00C04986 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
FB862E7820548D6C00C04986 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
FB862E7920548D6C00C04986 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
FB862E7A20548D6C00C04986 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
FB862E7C20548D6C00C04986 /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FB862E7D20548D6C00C04986 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
FB8CCC16204C8249002BBFDA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
FB8CCC17204C8249002BBFDA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
FB8CCC18204C8249002BBFDA /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
@@ -77,6 +98,28 @@
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
FB862E7B20548D6C00C04986 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
FB862E7C20548D6C00C04986 /* App.framework in Embed Frameworks */,
FB862E7D20548D6C00C04986 /* Flutter.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
FB862E7F20548D6C00C04986 /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
);
name = "Embed App Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
FB8CCC2D204C8249002BBFDA /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@@ -133,7 +176,9 @@
BBA9BB391F17927C0053B6EA /* CoreVideo.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreVideo.framework; path = System/Library/Frameworks/CoreVideo.framework; sourceTree = SDKROOT; };
BBA9BB3B1F1792A90053B6EA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
BBA9BB601F179D270053B6EA /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
FB8CCC37204C824A002BBFDA /* Debug-Dinect-INT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Debug-Dinect-INT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FB862E8320548D6C00C04986 /* Dinect-Crypto.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dinect-Crypto.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FB862E8420548D6C00C04986 /* Debug-Dinect-INT copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Debug-Dinect-INT copy-Info.plist"; path = "/Users/kifio/Desktop/FlutterProjects/checker/ios/Debug-Dinect-INT copy-Info.plist"; sourceTree = "<absolute>"; };
FB8CCC37204C824A002BBFDA /* Dinect-INT.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Dinect-INT.app"; sourceTree = BUILT_PRODUCTS_DIR; };
FB8CCC38204C824A002BBFDA /* Runner copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "Runner copy-Info.plist"; path = "/Users/kifio/Desktop/FlutterProjects/checker/ios/Runner copy-Info.plist"; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
@@ -157,6 +202,22 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FB862E6A20548D6C00C04986 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FB862E6B20548D6C00C04986 /* libiconv.tbd in Frameworks */,
FB862E6C20548D6C00C04986 /* QuartzCore.framework in Frameworks */,
FB862E6D20548D6C00C04986 /* CoreVideo.framework in Frameworks */,
FB862E6E20548D6C00C04986 /* CoreAudio.framework in Frameworks */,
FB862E6F20548D6C00C04986 /* CoreMedia.framework in Frameworks */,
FB862E7020548D6C00C04986 /* CoreGraphics.framework in Frameworks */,
FB862E7120548D6C00C04986 /* AVFoundation.framework in Frameworks */,
FB862E7220548D6C00C04986 /* Flutter.framework in Frameworks */,
FB862E7320548D6C00C04986 /* App.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
FB8CCC1A204C8249002BBFDA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
@@ -207,6 +268,7 @@
BBA9BB001F1786510053B6EA /* Frameworks */,
578B8FA7D56ACA2E56C02128 /* Pods */,
FB8CCC38204C824A002BBFDA /* Runner copy-Info.plist */,
FB862E8420548D6C00C04986 /* Debug-Dinect-INT copy-Info.plist */,
);
sourceTree = "<group>";
};
@@ -214,7 +276,8 @@
isa = PBXGroup;
children = (
ACE861531F9F745B006FEF38 /* Runner.app */,
FB8CCC37204C824A002BBFDA /* Debug-Dinect-INT.app */,
FB8CCC37204C824A002BBFDA /* Dinect-INT.app */,
FB862E8320548D6C00C04986 /* Dinect-Crypto.app */,
);
name = Products;
sourceTree = "<group>";
@@ -290,9 +353,30 @@
productReference = ACE861531F9F745B006FEF38 /* Runner.app */;
productType = "com.apple.product-type.application";
};
FB8CCC12204C8249002BBFDA /* Debug-Dinect-INT */ = {
FB862E6320548D6C00C04986 /* Dinect-Crypto */ = {
isa = PBXNativeTarget;
buildConfigurationList = FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Debug-Dinect-INT" */;
buildConfigurationList = FB862E8020548D6C00C04986 /* Build configuration list for PBXNativeTarget "Dinect-Crypto" */;
buildPhases = (
FB862E6420548D6C00C04986 /* Run Script */,
FB862E6520548D6C00C04986 /* Sources */,
FB862E6A20548D6C00C04986 /* Frameworks */,
FB862E7420548D6C00C04986 /* Resources */,
FB862E7B20548D6C00C04986 /* Embed Frameworks */,
FB862E7E20548D6C00C04986 /* Thin Binary */,
FB862E7F20548D6C00C04986 /* Embed App Extensions */,
);
buildRules = (
);
dependencies = (
);
name = "Dinect-Crypto";
productName = Runner;
productReference = FB862E8320548D6C00C04986 /* Dinect-Crypto.app */;
productType = "com.apple.product-type.application";
};
FB8CCC12204C8249002BBFDA /* Dinect-INT */ = {
isa = PBXNativeTarget;
buildConfigurationList = FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Dinect-INT" */;
buildPhases = (
FB8CCC14204C8249002BBFDA /* Run Script */,
FB8CCC15204C8249002BBFDA /* Sources */,
@@ -306,9 +390,9 @@
);
dependencies = (
);
name = "Debug-Dinect-INT";
name = "Dinect-INT";
productName = Runner;
productReference = FB8CCC37204C824A002BBFDA /* Debug-Dinect-INT.app */;
productReference = FB8CCC37204C824A002BBFDA /* Dinect-INT.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
@@ -330,8 +414,11 @@
};
};
};
FB862E6320548D6C00C04986 = {
DevelopmentTeam = 926V94K5Q8;
ProvisioningStyle = Automatic;
};
FB8CCC12204C8249002BBFDA = {
DevelopmentTeam = BX8ZNQJVHU;
ProvisioningStyle = Automatic;
};
};
@@ -350,7 +437,8 @@
projectRoot = "";
targets = (
ACE861271F9F745B006FEF38 /* Runner */,
FB8CCC12204C8249002BBFDA /* Debug-Dinect-INT */,
FB8CCC12204C8249002BBFDA /* Dinect-INT */,
FB862E6320548D6C00C04986 /* Dinect-Crypto */,
);
};
/* End PBXProject section */
@@ -369,6 +457,19 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FB862E7420548D6C00C04986 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FB862E7520548D6C00C04986 /* flutter_assets in Resources */,
FB862E7620548D6C00C04986 /* app.flx in Resources */,
FB862E7720548D6C00C04986 /* LaunchScreen.storyboard in Resources */,
FB862E7820548D6C00C04986 /* AppFrameworkInfo.plist in Resources */,
FB862E7920548D6C00C04986 /* Assets.xcassets in Resources */,
FB862E7A20548D6C00C04986 /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
FB8CCC26204C8249002BBFDA /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
@@ -464,6 +565,34 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FB862E6420548D6C00C04986 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
FB862E7E20548D6C00C04986 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
};
FB8CCC14204C8249002BBFDA /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -506,6 +635,17 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
FB862E6520548D6C00C04986 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
FB862E6620548D6C00C04986 /* AppDelegate.m in Sources */,
FB862E6720548D6C00C04986 /* main.m in Sources */,
FB862E6820548D6C00C04986 /* GeneratedPluginRegistrant.m in Sources */,
FB862E6920548D6C00C04986 /* ScannerViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
FB8CCC15204C8249002BBFDA /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
@@ -715,6 +855,79 @@
};
name = Release;
};
FB862E8120548D6C00C04986 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = crypto;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = "Debug-Dinect-INT copy-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.crypto;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 1;
};
name = Debug;
};
FB862E8220548D6C00C04986 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = crypto;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
INFOPLIST_FILE = "Debug-Dinect-INT copy-Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.dinect.checker.crypto;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OBJC_INTERFACE_HEADER_NAME = "Autobonus-Swift.h";
SWIFT_VERSION = 3.0;
TARGETED_DEVICE_FAMILY = 1;
VALID_ARCHS = "arm64 arm7 armv7s";
};
name = Release;
};
FB8CCC35204C8249002BBFDA /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
@@ -727,7 +940,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -764,7 +977,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 926V94K5Q8;
DEVELOPMENT_TEAM = "";
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
@@ -809,7 +1022,16 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Debug-Dinect-INT" */ = {
FB862E8020548D6C00C04986 /* Build configuration list for PBXNativeTarget "Dinect-Crypto" */ = {
isa = XCConfigurationList;
buildConfigurations = (
FB862E8120548D6C00C04986 /* Debug */,
FB862E8220548D6C00C04986 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
FB8CCC34204C8249002BBFDA /* Build configuration list for PBXNativeTarget "Dinect-INT" */ = {
isa = XCConfigurationList;
buildConfigurations = (
FB8CCC35204C8249002BBFDA /* Debug */,

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB8CCC12204C8249002BBFDA"
BuildableName = "Dinect-INT.app"
BlueprintName = "Dinect-INT"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0920"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB862E6320548D6C00C04986"
BuildableName = "Dinect-Crypto.app"
BlueprintName = "Dinect-Crypto"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB862E6320548D6C00C04986"
BuildableName = "Dinect-Crypto.app"
BlueprintName = "Dinect-Crypto"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB862E6320548D6C00C04986"
BuildableName = "Dinect-Crypto.app"
BlueprintName = "Dinect-Crypto"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FB862E6320548D6C00C04986"
BuildableName = "Dinect-Crypto.app"
BlueprintName = "Dinect-Crypto"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>

View File

@@ -4,15 +4,28 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>Debug-Dinect-INT.xcscheme</key>
<key>Dinect INT.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>7</integer>
<integer>1</integer>
</dict>
<key>Dinect-Crypto.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>8</integer>
</dict>
<key>Runner.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
<integer>0</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>FB862E6320548D6C00C04986</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>

View File

@@ -63,6 +63,17 @@
@"appTitle" : @"PIP",
@"showBonus" : @YES,
},
@"com.dinect.checker.crypto" : @{
@"locale" : @"ru",
@"flavor" : @"crypto",
@"currency" : @643,
@"supportPhone" : @"8-800-77-55-032",
@"supportUrl" : @"http://www.dinect.com",
@"endPoint" : @"https://pos-api-int.dinect.com/20130701/",
@"appToken" : @"9fec83cdca38c357e6b65dbb17514cdd36bf2a08",
@"appTitle" : @"Dinect Crypto",
@"showBonus" : @NO,
},
};
NSDictionary *buildSettings = settings[bundleIdentifier];

View File

@@ -0,0 +1,90 @@
{
"author" : "Iconizer",
"version" : "1.0",
"images" : [
{
"size" : "1024x1024",
"filename" : "ios-marketing.png",
"expected-size" : "1024",
"idiom" : "ios-marketing",
"scale" : "1x"
},
{
"size" : "60x60",
"filename" : "iphone-appicon@3x.png",
"expected-size" : "180",
"idiom" : "iphone",
"scale" : "3x"
},
{
"size" : "40x40",
"filename" : "iphone-spotlight@2x.png",
"expected-size" : "80",
"idiom" : "iphone",
"scale" : "2x"
},
{
"size" : "40x40",
"filename" : "iphone-spotlight@3x.png",
"expected-size" : "120",
"idiom" : "iphone",
"scale" : "3x"
},
{
"size" : "60x60",
"filename" : "iphone-appicon@2x.png",
"expected-size" : "120",
"idiom" : "iphone",
"scale" : "2x"
},
{
"size" : "57x57",
"filename" : "iphone-oldAppicon@1x.png",
"expected-size" : "57",
"idiom" : "iphone",
"scale" : "1x"
},
{
"size" : "29x29",
"filename" : "iphone-settings@2x.png",
"expected-size" : "58",
"idiom" : "iphone",
"scale" : "2x"
},
{
"size" : "29x29",
"filename" : "iphone-settings@1x.png",
"expected-size" : "29",
"idiom" : "iphone",
"scale" : "1x"
},
{
"size" : "29x29",
"filename" : "iphone-settings@3x.png",
"expected-size" : "87",
"idiom" : "iphone",
"scale" : "3x"
},
{
"size" : "57x57",
"filename" : "iphone-oldAppicon@2x.png",
"expected-size" : "114",
"idiom" : "iphone",
"scale" : "2x"
},
{
"size" : "20x20",
"filename" : "iphone-notification@2x.png",
"expected-size" : "40",
"idiom" : "iphone",
"scale" : "2x"
},
{
"size" : "20x20",
"filename" : "iphone-notification@3x.png",
"expected-size" : "60",
"idiom" : "iphone",
"scale" : "3x"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -138,6 +138,7 @@ import Flutter
}
func sendResult(_ str: String) {
print("result: \(str)")
platformChannel?.invokeMethod("findUser", arguments: [str, buttonState.searchType], result: { (result: Any?) in
if result is FlutterError {
self.showErrorAlert(str)
@@ -296,8 +297,6 @@ import Flutter
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()

View File

@@ -1,31 +1,15 @@
import 'dart:async';
import 'package:checker/screens/faq.dart';
import 'package:checker/screens/purchase.dart';
import 'package:checker/screens/registration.dart';
import 'package:checker/screens/settings.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'db.dart';
import 'dart:convert';
import 'network.dart';
import 'resources.dart';
import 'strings.dart';
// Канал для взаимодействия с кодом платформы.
const platform = const MethodChannel('com.dinect.checker/instance_id');
// Метод обеспечивает замену текущего объекта route новым.
pushRouteReplacement(BuildContext context, Widget widget) {
var route =
new MaterialPageRoute<Null>(builder: (BuildContext context) => widget);
new Future.delayed(const Duration(milliseconds: 200), () {
Navigator.of(context).pushReplacement(route);
});
}
pushRoute(BuildContext context, Widget widget) {
var route =
new MaterialPageRoute<Null>(builder: (BuildContext context) => widget, fullscreenDialog: true);
@@ -41,54 +25,6 @@ faq(SqliteHelper helper, String app, BuildContext context,
pushRoute(context, new FAQScreen(helper, app, returnToScanner));
}
// В методе отправляется запрос на удаление токена кассы, очищаются SharedPreferences приложения.
logout(BuildContext context, SqliteHelper helper) async {
String token = await helper.getToken();
VoidCallback positiveCallback = () {
if (token != null) {
getDeleteTokenRequest(token).then((response) {
helper.clear().then((result) {
platform.invokeMethod('getFlavor').then((flavor) {
while (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
pushRouteReplacement(context, new RegistrationScreen(helper, flavor));
});
});
}).catchError((error) {
print(error.toString());
});
} else {
while (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
}
};
showYesNoDialog(context, StringsLocalization.confirmation(),
StringsLocalization.askChangeStore(), positiveCallback);
}
// Запуск диалога с двумя кнопками
showYesNoDialog(BuildContext context, String title, String content,
VoidCallback positiveCallback) {
showDialog(
context: context,
child: new AlertDialog(
title: new Text(title),
content: new Text(content),
actions: <Widget>[
new FlatButton(
child: new Text(StringsLocalization.no()),
onPressed: () {
Navigator.of(context).pop();
}),
new FlatButton(
child: new Text(StringsLocalization.yes()),
onPressed: positiveCallback)
]));
}
getCurrencyTitle(int code) {
switch (code) {
case 643:
@@ -116,8 +52,3 @@ getLocaleTitle(String code) {
return 'Español';
}
}
// Добавил вызов, что-бы AOT компилер не выкинул либу.
getImage() async {
return await ImagePicker.pickImage();
}

View File

@@ -81,11 +81,13 @@ class SqliteHelper {
Map results = new Map();
Map settings = await selectAll(tableSettings);
if (settings != null && settings.isNotEmpty) {
results.addAll(settings);
}
if (withSession) {
Map session = await selectAll(tableSession);
if (settings != null && session != null) {
if (session != null && session.isNotEmpty) {
results.addAll(session);
}
}

View File

@@ -19,7 +19,7 @@ main() {
helper.open().then((_) {
helper.getLocale().then((locale) {
if (locale == null) {
initWithSystemValue(app, appName, helper);
initWithSystemValue(app, appName, locale, helper);
} else {
start(app, appName, locale, helper);
}
@@ -29,9 +29,9 @@ main() {
});
}
initWithSystemValue(String app, String name, SqliteHelper helper) {
initWithSystemValue(String app, String name, String locale, SqliteHelper helper) {
helper.getSettings(false).then((settings) {
if (settings == null) {
if (settings.isEmpty) {
createSettingsTable(app, name, helper);
} else {
start(app, name, locale, helper);

View File

@@ -135,11 +135,7 @@ class FAQScreenState<T> extends BaseState<FAQScreen> {
}
}
// onWillPop() {
// if(returnToScanner) {
// return startScanner(context, app, helper);
// } else {
// return true;
// }
// }
@override bool isAutomaticallyImplyLeading() {
return true;
}
}

View File

@@ -59,28 +59,25 @@ class RegistrationScreenState extends BaseState<FinishRegistrationScreen> {
// Если токен активирован, то открывается экран со сканером,
// Если нет, то отправляется запрос на проверку статуса токена.
handleTap() async {
handleTap() {
print('tokenActive: $_tokenActive');
if (_tokenActive) {
new Future.delayed(const Duration(milliseconds: 200), () {
Navigator.of(context).pop();
});
Navigator.of(context).pop(true);
} else {
if (await platform.invokeMethod('isOnline')) {
String token = await helper.getToken();
platform.invokeMethod('isOnline').then((isOnline) {
if (isOnline ) {
helper.getToken().then((token) {
getCheckTokenStatusRequest(token).then((response) {
Map parsedMap = JSON.decode(response.body);
// Обновить экран, заменить сообщение о необходимости активации токена, на сообщние о том, что токен активен.
setState(() {
_tokenActive = parsedMap['active'];
_tokenActive = JSON.decode(response.body)['active'];
});
}).catchError((error) {
print(error.toString());
return false;
});
});
}
});
}
}

View File

@@ -114,7 +114,7 @@ class RegistrationScreenState extends BaseState<RegistrationScreen> {
helper.createSession(merchantID, posID, parsedMap['token']).then((_) {
new Future.delayed(const Duration(milliseconds: 200), () {
var route = new MaterialPageRoute<bool>(builder: (BuildContext context) => new FinishRegistrationScreen(helper, app), fullscreenDialog: true);
Navigator.of(context).pushReplacement(route).then((b) {
Navigator.of(context).push(route).then((b) {
print('finish registration closed: $b');
});
});

View File

@@ -1,10 +1,14 @@
import 'dart:async';
import 'package:checker/base/base_screen.dart';
import 'package:checker/base/base_state.dart';
import 'package:checker/common.dart';
import 'package:checker/consts.dart';
import 'package:checker/db.dart';
import 'package:checker/network.dart';
import 'package:checker/screens/currencies.dart';
import 'package:checker/screens/languages.dart';
import 'package:checker/screens/splash.dart';
import 'package:checker/strings.dart';
import 'package:flutter/material.dart';
@@ -42,12 +46,18 @@ class SettingsState extends BaseState<SettingsScreen> {
this.returnToScanner = returnToScanner;
}
@override
void initState() {
print('init state!');
super.initState();
}
@override Widget build(BuildContext ctx) {
helper.getSettings(true).then((info) {
setState(() {
print('currency: ${info['currency']}');
print('locale: ${info['locale']}');
print('token: ${info['token']}');
// print('currency: ${info['currency']}');
// print('locale: ${info['locale']}');
// print('token: ${info['token']}');
menuItems[0].title = StringsLocalization.currency();
menuItems[1].title = StringsLocalization.locale();
menuItems[2].title = StringsLocalization.logout();
@@ -152,6 +162,55 @@ class SettingsState extends BaseState<SettingsScreen> {
}
}
// В методе отправляется запрос на удаление токена кассы, очищаются SharedPreferences приложения.
logout(BuildContext context, SqliteHelper helper) async {
String token = await helper.getToken();
VoidCallback positiveCallback = () {
if (token != null) {
getDeleteTokenRequest(token).then((response) {
helper.clear().then((result) {
while (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
var route = new MaterialPageRoute<Null>(builder: (BuildContext context) => new SplashScreen(helper, app));
new Future.delayed(const Duration(milliseconds: 200), () {
Navigator.of(context).pushReplacement(route);
});
});
}).catchError((error) {
print(error.toString());
});
} else {
while (Navigator.of(context).canPop()) {
Navigator.of(context).pop();
}
}
};
showYesNoDialog(context, StringsLocalization.confirmation(),
StringsLocalization.askChangeStore(), positiveCallback);
}
// Запуск диалога с двумя кнопками
showYesNoDialog(BuildContext context, String title, String content,
VoidCallback positiveCallback) {
showDialog(
context: context,
child: new AlertDialog(
title: new Text(title),
content: new Text(content),
actions: <Widget>[
new FlatButton(
child: new Text(StringsLocalization.no()),
onPressed: () {
Navigator.of(context).pop();
}),
new FlatButton(
child: new Text(StringsLocalization.yes()),
onPressed: positiveCallback)
]));
}
Widget getArrow() {
return new Container(margin: new EdgeInsets.only(left: 8.0),
child: new Image.asset(settings_arrow_png, height: 42.0));
@@ -161,12 +220,4 @@ class SettingsState extends BaseState<SettingsScreen> {
String getTitle() {
return StringsLocalization.settings();
}
// onWillPop() {
// if (returnToScanner) {
// return startScanner(context, app, helper);
// } else {
// return true;
// }
// }
}

View File

@@ -78,24 +78,23 @@ class _SplashScreenState extends BaseState<SplashScreen> {
]));
}
/// Запуск следующего экрана приложения.
showNextScreen() async {
String token = await helper.getToken();
// В случае, если в приложении отсутствует токен,
// необходимо запустить регистрацию кассы.
if (token == null) {
startRegistration(Widget screen) {
new Future.delayed(const Duration(milliseconds: 200), () {
var route = new MaterialPageRoute<bool>(
builder: (BuildContext context) => new RegistrationScreen(helper, app), fullscreenDialog: true);
Navigator.of(context).push(route).then((b) {
var route = new MaterialPageRoute<String>(
builder: (BuildContext context) => screen, fullscreenDialog: true);
Navigator.of(context).push(route).then((token) {
_initAndStartScanner(context, app, token, helper);
});
});
}
// pushRoute(context, new RegistrationScreen(helper, app));
/// Запуск следующего экрана приложения.
showNextScreen() async {
String token = await helper.getToken();
// В случае, если в приложении отсутствует токен,
// необходимо запустить регистрацию кассы.
if (token == null) {
startRegistration(new RegistrationScreen(helper, app));
} else {
if (await platform.invokeMethod('isOnline')) {
getCheckTokenStatusRequest(token).then((statusResponse) {
@@ -114,7 +113,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
int code = statusResponse.statusCode;
if (code == 404) {
helper.clear().then((result) {
pushRouteReplacement(context, new RegistrationScreen(helper, app));
startRegistration(new RegistrationScreen(helper, app));
});
} else {
Map status = JSON.decode(statusResponse.body);
@@ -146,8 +145,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
getCreateTokenRequest({'merchant_shop': merchantID, 'pos': posID})
.then((response) {
if (response.statusCode == 409) {
pushRouteReplacement(
context, new FinishRegistrationScreen(helper, app));
startRegistration(new FinishRegistrationScreen(helper, app));
} else if (response.statusCode == 201) {
clearToken(response, helper);
}
@@ -161,8 +159,7 @@ class _SplashScreenState extends BaseState<SplashScreen> {
helper.clear().then((_) {
Map parsedMap = JSON.decode(response.body);
getDeleteTokenRequest(parsedMap['token']).then((_) {
Navigator.of(context).pop();
pushRouteReplacement(context, new RegistrationScreen(helper, app));
startRegistration(new RegistrationScreen(helper, app));
}).catchError((error) {
print(error.toString());
});
@@ -186,6 +183,8 @@ class _SplashScreenState extends BaseState<SplashScreen> {
userResponse.then((response) {
List<Map> users;
try {
users = JSON.decode(response.body);
} catch (error) {
@@ -203,10 +202,9 @@ class _SplashScreenState extends BaseState<SplashScreen> {
faq(helper, app, context, true);
} else if (call.method == 'settings') {
new Future.delayed(const Duration(milliseconds: 200), () {
var route = new MaterialPageRoute<bool>(
var route = new MaterialPageRoute<Null>(
builder: (BuildContext context) => new SettingsScreen(helper, app, true), fullscreenDialog: true);
Navigator.of(context).push(route).then((b) {
print('purchase closed: $b');
Navigator.of(context).push(route).then((_) {
_initAndStartScanner(context, app, token, helper);
});
});
@@ -246,10 +244,9 @@ class _SplashScreenState extends BaseState<SplashScreen> {
startScanner(String token, String userString, String card) {
new Future.delayed(const Duration(milliseconds: 200), () {
var route = new MaterialPageRoute<bool>(
var route = new MaterialPageRoute<Null>(
builder: (BuildContext context) => new PurchaseScreen(helper, app, userString, card), fullscreenDialog: true);
Navigator.of(context).push(route).then((b) {
print('purchase closed: $b');
Navigator.of(context).push(route).then((_) {
_initAndStartScanner(context, app, token, helper);
});
});

View File

@@ -41,13 +41,6 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.1"
image_picker:
dependency: "direct main"
description:
name: image_picker
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.5"
matcher:
dependency: transitive
description:
@@ -82,7 +75,7 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.3"
version: "1.7.5"
sky_engine:
dependency: transitive
description: flutter
@@ -152,4 +145,4 @@ packages:
source: hosted
version: "2.6.0"
sdks:
dart: ">=2.0.0-dev.23.0 <=2.0.0-edge.fe96de2858f078e4ad04f8f30640184bf3d8102d"
dart: ">=2.0.0-dev.23.0 <=2.0.0-edge.0d5cf900b021bf5c9fa593ffa12b15bcd1cc5fe0"

View File

@@ -6,7 +6,6 @@ dependencies:
sprintf: "^3.0.2"
path_provider: "^0.2.1+1"
sqflite: any
image_picker: '^0.1.3' # use for ask permissions @ iOS
xml: "^2.6.0"
flutter:
sdk: flutter