diff --git a/ios/.hgignore b/ios/.hgignore
index c631b1f..0036135 100644
--- a/ios/.hgignore
+++ b/ios/.hgignore
@@ -29,4 +29,5 @@ Flutter/Flutter.framework
Flutter/Generated.xcconfig
ServiceDefinitions.json
+Podfile.lock
Pods/
diff --git a/ios/GoogleService-Info.plist b/ios/GoogleService-Info.plist
new file mode 100644
index 0000000..760900a
--- /dev/null
+++ b/ios/GoogleService-Info.plist
@@ -0,0 +1,40 @@
+
+
+
+
+ AD_UNIT_ID_FOR_BANNER_TEST
+ ca-app-pub-3940256099942544/2934735716
+ AD_UNIT_ID_FOR_INTERSTITIAL_TEST
+ ca-app-pub-3940256099942544/4411468910
+ CLIENT_ID
+ 930872418262-g3cgir5nalm3lkrcnn1aoi1t3mkg63b7.apps.googleusercontent.com
+ REVERSED_CLIENT_ID
+ com.googleusercontent.apps.930872418262-g3cgir5nalm3lkrcnn1aoi1t3mkg63b7
+ API_KEY
+ AIzaSyCZr-Ra2PdsMDs9reukPrW7BHY5bbp0VN0
+ GCM_SENDER_ID
+ 930872418262
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.dinect.checker.autoclub.app
+ PROJECT_ID
+ choker-d8897
+ STORAGE_BUCKET
+ choker-d8897.appspot.com
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:930872418262:ios:c192655afeda9a29
+ DATABASE_URL
+ https://choker-d8897.firebaseio.com
+
+
\ No newline at end of file
diff --git a/ios/Podfile b/ios/Podfile
index 8d47edc..d75bb32 100644
--- a/ios/Podfile
+++ b/ios/Podfile
@@ -8,6 +8,7 @@ end
target ‘Runner’ do
# Pods for Runner
+ pod 'Firebase'
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
@@ -28,7 +29,8 @@ target ‘Runner’ do
end
end
target ‘Dinect’ do
- # Pods for Runner
+ # Pods for Dinect
+ pod 'Firebase'
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
@@ -49,7 +51,8 @@ target ‘Dinect’ do
end
end
target ‘Crypto’ do
- # Pods for Runner
+ # Pods for Crypto
+ pod 'Firebase'
# Flutter Pods
pod 'Flutter', :path => ENV['FLUTTER_FRAMEWORK_DIR']
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index 8ed00a3..9a07cfe 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -1,10 +1,32 @@
PODS:
+ - Firebase (4.9.0):
+ - Firebase/Core (= 4.9.0)
+ - Firebase/Core (4.9.0):
+ - FirebaseAnalytics (= 4.0.9)
+ - FirebaseCore (= 4.0.15)
+ - FirebaseAnalytics (4.0.9):
+ - FirebaseCore (~> 4.0)
+ - FirebaseInstanceID (~> 2.0)
+ - GoogleToolboxForMac/NSData+zlib (~> 2.1)
+ - nanopb (~> 0.3)
+ - FirebaseCore (4.0.15):
+ - GoogleToolboxForMac/NSData+zlib (~> 2.1)
+ - FirebaseInstanceID (2.0.9):
+ - FirebaseCore (~> 4.0)
- Flutter (1.0.0)
- FMDB (2.7.2):
- FMDB/standard (= 2.7.2)
- FMDB/standard (2.7.2)
+ - GoogleToolboxForMac/Defines (2.1.3)
+ - GoogleToolboxForMac/NSData+zlib (2.1.3):
+ - GoogleToolboxForMac/Defines (= 2.1.3)
- image_picker (0.0.1):
- Flutter
+ - nanopb (0.3.8):
+ - nanopb/decode (= 0.3.8)
+ - nanopb/encode (= 0.3.8)
+ - nanopb/decode (0.3.8)
+ - nanopb/encode (0.3.8)
- path_provider (0.0.1):
- Flutter
- sqflite (0.0.1):
@@ -15,30 +37,37 @@ 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.8.4/ios`)
+ - Firebase
+ - 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.8.4/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.8.4/ios
+ :path: /Users/kifio/.pub-cache/hosted/pub.dartlang.org/sqflite-0.8.4/ios
SPEC CHECKSUMS:
+ Firebase: 632216af3ed7f31e3be34776947fdc7546cfb572
+ FirebaseAnalytics: 388b630c15713f5dbf364071f5f3d6077fb52f4e
+ FirebaseCore: 3bd047463058fa6b5d312c97502c52e45401cdfb
+ FirebaseInstanceID: d2058a35e9bebda1b6dd42486b84917bde552a9d
Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296
FMDB: 6198a90e7b6900cfc046e6bc0ef6ebb7be9236aa
+ GoogleToolboxForMac: 2501e2ad72a52eb3dfe7bd9aee7dad11b858bd20
image_picker: ee00aab0487cedc80a304085219503cc6d0f2e22
+ nanopb: 5601e6bca2dbf1ed831b519092ec110f66982ca3
path_provider: 09407919825bfe3c2deae39453b7a5b44f467873
sqflite: d1612813fa7db7c667bed9f1d1b508deffc56999
ZXingObjC: 2c95a0dc52daac69b23ec78fad8fa2fec05f8981
-PODFILE CHECKSUM: bc84f52b27b79dc608eec3537282fdff2347d9b4
+PODFILE CHECKSUM: a023f10f95f916199687af47ef83b54859958d0d
COCOAPODS: 1.4.0
diff --git a/ios/Runner.xcodeproj/xcuserdata/kifio.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/Runner.xcodeproj/xcuserdata/kifio.xcuserdatad/xcschemes/xcschememanagement.plist
index a6fcb64..dc16213 100644
--- a/ios/Runner.xcodeproj/xcuserdata/kifio.xcuserdatad/xcschemes/xcschememanagement.plist
+++ b/ios/Runner.xcodeproj/xcuserdata/kifio.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -4,6 +4,11 @@
SchemeUserState
+ BioChecker.xcscheme
+
+ orderHint
+ 14
+
Dinect INT.xcscheme_^#shared#^_
orderHint
@@ -12,13 +17,18 @@
Dinect-Crypto.xcscheme_^#shared#^_
orderHint
- 7
+ 5
Dinect.xcscheme
orderHint
11
+ Dinect.xcscheme_^#shared#^_
+
+ orderHint
+ 13
+
Runner.xcscheme_^#shared#^_
orderHint
diff --git a/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate b/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate
index 0b66bd2..bd32376 100644
Binary files a/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate and b/ios/Runner.xcworkspace/xcuserdata/kifio.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/ios/Runner/AppDelegate.m b/ios/Runner/AppDelegate.m
index 7fd9c8c..3f097a7 100644
--- a/ios/Runner/AppDelegate.m
+++ b/ios/Runner/AppDelegate.m
@@ -1,10 +1,12 @@
#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "Autobonus-Swift.h"
+@import Firebase;
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+ [FIRApp configure];
[GeneratedPluginRegistrant registerWithRegistry:self];
@@ -123,6 +125,8 @@
result(buildSettings[@"showBonus"]);
} else if ([@"getVersionName" isEqualToString:call.method]) {
result([[NSBundle mainBundle] objectForInfoDictionaryKey: @"CFBundleShortVersionString"]);
+ } else if ([@"logError" isEqualToString:call.method]) {
+ NSLog(@"%@", call.arguments[@"message"]);
} else {
result(FlutterMethodNotImplemented);
}
diff --git a/ios/Runner/ScannerViewController.swift b/ios/Runner/ScannerViewController.swift
index 55948aa..0b9cee5 100644
--- a/ios/Runner/ScannerViewController.swift
+++ b/ios/Runner/ScannerViewController.swift
@@ -61,22 +61,22 @@ import Flutter
func getInputHint() -> String {
switch self.buttonState {
- case .card: return strings["enter_manual"]!
- case .phone: return strings["enter_phone"]!
+ case .card: return strings["enter_manual"]!
+ case .phone: return strings["enter_phone"]!
}
}
func getErrorText() -> String {
switch self.buttonState {
- case .card: return strings["user_card_not_found"]!
- case .phone: return strings["user_phone_not_found"]!
+ case .card: return strings["user_card_not_found"]!
+ case .phone: return strings["user_phone_not_found"]!
}
}
func setButtonState() {
switch self.buttonState {
- case .card: self.buttonState = .phone
- case .phone: self.buttonState = .card
+ case .card: self.buttonState = .phone
+ case .phone: self.buttonState = .card
}
}
@@ -104,7 +104,7 @@ import Flutter
settingButton.setImage(self.buttonState.icon, for: .normal)
textField.placeholder = self.getInputHint()
-// textField.text = "79087654321"
+ // textField.text = "79087654321"
}
override func viewWillAppear(_ animated: Bool) {
@@ -115,12 +115,108 @@ import Flutter
applyOrientation()
}
+ // TODO: Вынести эту копипасту в методы, когда будет время
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)
+
+ var path = UIBezierPath()
+ path.move(to: CGPoint(x: 32, y: view.frame.size.height / 2))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: view.frame.size.height / 2))
+
+ var shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.strokeColor = UIColor.red.cgColor
+ shapeLayer.fillColor = UIColor.clear.cgColor
+ shapeLayer.lineWidth = 2
+
+ view.layer.addSublayer(shapeLayer)
+
+ path = UIBezierPath()
+ path.move(to: CGPoint(x: 32, y: (view.frame.size.height / 2) - 32))
+ path.addLine(to: CGPoint(x: 32, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: 64, y: (view.frame.size.height / 2) - 64))
+
+ path.move(to: CGPoint(x: view.frame.size.width - 64, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) - 32))
+
+ path.move(to: CGPoint(x: 32, y: (view.frame.size.height / 2) + 32))
+ path.addLine(to: CGPoint(x: 32, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: 64, y: (view.frame.size.height / 2) + 64))
+
+ path.move(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) + 32))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 64, y: (view.frame.size.height / 2) + 64))
+
+ shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.strokeColor = UIColor.green.cgColor
+ shapeLayer.fillColor = UIColor.clear.cgColor
+ shapeLayer.lineWidth = 2
+
+ view.layer.addSublayer(shapeLayer)
+
+ path = UIBezierPath()
+ path.move(to: CGPoint(x: 0, y: 56))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: 56))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: 0, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: 0, y: 56))
+ path.close()
+
+ shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.fillColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor
+
+ view.layer.addSublayer(shapeLayer)
+
+ path = UIBezierPath()
+ path.move(to: CGPoint(x: 0, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: 32, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: 32, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: 0, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: 0, y: (view.frame.size.height / 2) - 64))
+ path.close()
+
+ shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.fillColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor
+
+ view.layer.addSublayer(shapeLayer)
+
+ path = UIBezierPath()
+ path.move(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) - 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width - 32, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) - 64))
+ path.close()
+
+ shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.fillColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor
+
+ view.layer.addSublayer(shapeLayer)
+
+ path = UIBezierPath()
+ path.move(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: 0, y: (view.frame.size.height / 2) + 64))
+ path.addLine(to: CGPoint(x: 0, y: view.frame.size.height))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: view.frame.size.height))
+ path.addLine(to: CGPoint(x: view.frame.size.width, y: (view.frame.size.height / 2) + 64))
+ path.close()
+
+ shapeLayer = CAShapeLayer()
+ shapeLayer.path = path.cgPath
+ shapeLayer.fillColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.5).cgColor
+
+ view.layer.addSublayer(shapeLayer)
+
}
func hideKeyboard() {
@@ -134,7 +230,7 @@ import Flutter
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
- print("User from manual input: \(textField.text)")
+ print("User from manual input: \(textField.text!)")
sendResult(textField.text!)
return true
}
@@ -306,3 +402,4 @@ import Flutter
})
}
}
+