New icon.

New debug info status (warning)
This commit is contained in:
Selim Mustafaev 2021-01-30 22:01:07 +03:00
parent 2fb34f43d0
commit 624a8beefe
42 changed files with 106 additions and 62 deletions

View File

@ -847,7 +847,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 65; CURRENT_PROJECT_VERSION = 66;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;
@ -870,7 +870,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements; CODE_SIGN_ENTITLEMENTS = AutoCat/AutoCat.entitlements;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 65; CURRENT_PROJECT_VERSION = 66;
DEVELOPMENT_TEAM = 46DTTB8X4S; DEVELOPMENT_TEAM = 46DTTB8X4S;
INFOPLIST_FILE = AutoCat/Info.plist; INFOPLIST_FILE = AutoCat/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0; IPHONEOS_DEPLOYMENT_TARGET = 13.0;

View File

@ -25,7 +25,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
let config = Realm.Configuration( let config = Realm.Configuration(
schemaVersion: 29, schemaVersion: 32,
migrationBlock: { migration, oldSchemaVersion in migrationBlock: { migration, oldSchemaVersion in
if oldSchemaVersion <= 3 { if oldSchemaVersion <= 3 {
var numbers: [String] = [] var numbers: [String] = []
@ -110,6 +110,28 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
} }
} }
} }
if oldSchemaVersion <= 31 {
migration.enumerateObjects(ofType: "Vehicle") { old, new in
if let oldDebugInfo = old?["debugInfo"] as? DynamicObject, let newDebugInfo = new?["debugInfo"] as? DynamicObject {
let addStatus = { (providerName: String) -> Void in
if let provider = oldDebugInfo[providerName] as? DynamicObject, let newProvider = newDebugInfo[providerName] as? DynamicObject {
if provider["error"] != nil {
newProvider["status"] = DebugInfoStatus.error.rawValue
} else {
newProvider["status"] = DebugInfoStatus.success.rawValue
}
}
}
addStatus("autocod")
addStatus("vin01vin")
addStatus("vin01base")
addStatus("vin01history")
addStatus("nomerogram")
}
}
}
}) })
Realm.Configuration.defaultConfiguration = config Realm.Configuration.defaultConfiguration = config

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,116 +1,116 @@
{ {
"images" : [ "images" : [
{ {
"size" : "20x20", "filename" : "wheel-40.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-40.png", "scale" : "2x",
"scale" : "2x" "size" : "20x20"
}, },
{ {
"size" : "20x20", "filename" : "wheel-60.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-60.png", "scale" : "3x",
"scale" : "3x" "size" : "20x20"
}, },
{ {
"size" : "29x29", "filename" : "wheel-58.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-58.png", "scale" : "2x",
"scale" : "2x" "size" : "29x29"
}, },
{ {
"size" : "29x29", "filename" : "wheel-87.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-87.png", "scale" : "3x",
"scale" : "3x" "size" : "29x29"
}, },
{ {
"size" : "40x40", "filename" : "wheel-80.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-80.png", "scale" : "2x",
"scale" : "2x" "size" : "40x40"
}, },
{ {
"size" : "40x40", "filename" : "wheel-120.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-120.png", "scale" : "3x",
"scale" : "3x" "size" : "40x40"
}, },
{ {
"size" : "60x60", "filename" : "wheel-121.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-121.png", "scale" : "2x",
"scale" : "2x" "size" : "60x60"
}, },
{ {
"size" : "60x60", "filename" : "wheel-180.png",
"idiom" : "iphone", "idiom" : "iphone",
"filename" : "AppIcon-180.png", "scale" : "3x",
"scale" : "3x" "size" : "60x60"
}, },
{ {
"size" : "20x20", "filename" : "wheel-20.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-20.png", "scale" : "1x",
"scale" : "1x" "size" : "20x20"
}, },
{ {
"size" : "20x20", "filename" : "wheel-41.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-41.png", "scale" : "2x",
"scale" : "2x" "size" : "20x20"
}, },
{ {
"size" : "29x29", "filename" : "wheel-29.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-29.png", "scale" : "1x",
"scale" : "1x" "size" : "29x29"
}, },
{ {
"size" : "29x29", "filename" : "wheel-59.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-59.png", "scale" : "2x",
"scale" : "2x" "size" : "29x29"
}, },
{ {
"size" : "40x40", "filename" : "wheel-42.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-42.png", "scale" : "1x",
"scale" : "1x" "size" : "40x40"
}, },
{ {
"size" : "40x40", "filename" : "wheel-81.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-81.png", "scale" : "2x",
"scale" : "2x" "size" : "40x40"
}, },
{ {
"size" : "76x76", "filename" : "wheel-76.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-76.png", "scale" : "1x",
"scale" : "1x" "size" : "76x76"
}, },
{ {
"size" : "76x76", "filename" : "wheel-152.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-152.png", "scale" : "2x",
"scale" : "2x" "size" : "76x76"
}, },
{ {
"size" : "83.5x83.5", "filename" : "wheel-167.png",
"idiom" : "ipad", "idiom" : "ipad",
"filename" : "AppIcon-167.png", "scale" : "2x",
"scale" : "2x" "size" : "83.5x83.5"
}, },
{ {
"size" : "1024x1024", "filename" : "wheel-1024.png",
"idiom" : "ios-marketing", "idiom" : "ios-marketing",
"filename" : "AppIcon-1024.png", "scale" : "1x",
"scale" : "1x" "size" : "1024x1024"
} }
], ],
"info" : { "info" : {
"version" : 1, "author" : "xcode",
"author" : "xcode" "version" : 1
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -299,7 +299,7 @@ class CheckController: UIViewController, UITableViewDelegate, UITextFieldDelegat
return Single.just(event) return Single.just(event)
} }
if let event = LocationManager.lastEvent, (Date().timeIntervalSince1970 - event.date) < 60 { if let event = LocationManager.lastEvent, (Date().timeIntervalSince1970 - event.date) < 15 {
return Single<VehicleEvent>.just(event) return Single<VehicleEvent>.just(event)
} else { } else {
return LocationManager.requestCurrentLocation() return LocationManager.requestCurrentLocation()

View File

@ -1,6 +1,12 @@
import Foundation import Foundation
import RealmSwift import RealmSwift
enum DebugInfoStatus: Int {
case success = 0
case error = 1
case warning = 2
}
class DebugInfo: Object, Decodable { class DebugInfo: Object, Decodable {
@objc dynamic var autocod: DebugInfoEntry! @objc dynamic var autocod: DebugInfoEntry!
@objc dynamic var vin01vin: DebugInfoEntry! @objc dynamic var vin01vin: DebugInfoEntry!
@ -12,4 +18,10 @@ class DebugInfo: Object, Decodable {
class DebugInfoEntry: Object, Decodable { class DebugInfoEntry: Object, Decodable {
@objc dynamic var fields: Int64 = 0 @objc dynamic var fields: Int64 = 0
@objc dynamic var error: String? @objc dynamic var error: String?
@objc dynamic var status: Int = 0
var statusEnum: DebugInfoStatus {
get { DebugInfoStatus(rawValue: self.status)! }
set { self.status = newValue.rawValue }
}
} }

View File

@ -1,6 +1,16 @@
import UIKit import UIKit
import Eureka import Eureka
extension DebugInfoStatus {
var color: UIColor {
switch self {
case .success: return .systemGreen
case .error: return .systemRed
case .warning: return .systemOrange
}
}
}
class SourceStatusCell: Cell<DebugInfoEntry>, CellType { class SourceStatusCell: Cell<DebugInfoEntry>, CellType {
private var circle: UIImageView! private var circle: UIImageView!
@ -32,7 +42,7 @@ class SourceStatusCell: Cell<DebugInfoEntry>, CellType {
self.detailTextLabel?.text = nil self.detailTextLabel?.text = nil
if let value = row.value { if let value = row.value {
self.circle.tintColor = value.error == nil ? .systemGreen : .systemRed self.circle.tintColor = value.statusEnum.color
//self.accessoryType = value.error == nil ? .none : .disclosureIndicator //self.accessoryType = value.error == nil ? .none : .disclosureIndicator
} else { } else {
self.circle.tintColor = .systemGray self.circle.tintColor = .systemGray