Fixed crash
This commit is contained in:
parent
c1820396e0
commit
ee48f01a5f
@ -603,7 +603,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 = 7;
|
CURRENT_PROJECT_VERSION = 8;
|
||||||
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;
|
||||||
@ -625,7 +625,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 = 7;
|
CURRENT_PROJECT_VERSION = 8;
|
||||||
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;
|
||||||
|
|||||||
@ -92,7 +92,7 @@ class CheckController: UIViewController, MaskedTextFieldDelegateListener, UITabl
|
|||||||
.subscribe(onNext: onReceivedVehicle(_:), onError: { err in
|
.subscribe(onNext: onReceivedVehicle(_:), onError: { err in
|
||||||
if let realm = try? Realm() {
|
if let realm = try? Realm() {
|
||||||
try? realm.write {
|
try? realm.write {
|
||||||
realm.add(Vehicle(numberNormalized))
|
realm.add(Vehicle(numberNormalized), update: .modified)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
IHProgressHUD.showError(withStatus: err.localizedDescription)
|
IHProgressHUD.showError(withStatus: err.localizedDescription)
|
||||||
|
|||||||
2
AutoCat/ThirdParty/Api.swift
vendored
2
AutoCat/ThirdParty/Api.swift
vendored
@ -7,7 +7,7 @@ class Api {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static func createRequest<T>(api: String, method: String, body: [String: T]? = nil) -> URLRequest? where T: LosslessStringConvertible {
|
private static func createRequest<T>(api: String, method: String, body: [String: T]? = nil) -> URLRequest? where T: LosslessStringConvertible {
|
||||||
guard var urlComponents = URLComponents(string: Constants.baseUrl + api) else { return nil }
|
guard var urlComponents = URLComponents(string: Constants.debugBaseUrl + api) else { return nil }
|
||||||
|
|
||||||
if let body = body, method.uppercased() == "GET" {
|
if let body = body, method.uppercased() == "GET" {
|
||||||
urlComponents.queryItems = body.map { URLQueryItem(name: $0, value: String($1)) }
|
urlComponents.queryItems = body.map { URLQueryItem(name: $0, value: String($1)) }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user