From 16781fcad54566daa470d5bf12f405239b876f8a Mon Sep 17 00:00:00 2001 From: yangbin Date: Thu, 12 May 2022 18:07:08 +0800 Subject: [PATCH] 1.0.20(5) --- HDFwear.xcodeproj/project.pbxproj | 8 ++++---- HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate | Bin 798447 -> 0 bytes HDFwear/Setting/DailSyncViewController.swift | 9 ++++++++- HDFwear/Tools/BluetoothManager.swift | 17 +++++++++++------ 4 files changed, 23 insertions(+), 11 deletions(-) diff --git a/HDFwear.xcodeproj/project.pbxproj b/HDFwear.xcodeproj/project.pbxproj index 9dbb6a5..495ce63 100644 --- a/HDFwear.xcodeproj/project.pbxproj +++ b/HDFwear.xcodeproj/project.pbxproj @@ -2441,7 +2441,7 @@ CODE_SIGN_ENTITLEMENTS = HDFwear/HDFwear.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = W7QH47B2TU; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=*]" = armv7; @@ -2485,7 +2485,7 @@ "$(PROJECT_DIR)/HDFwear/3rd/Mediatek", "$(PROJECT_DIR)/HDFwear/3rd/QWeather.framework", ); - MARKETING_VERSION = 1.0.20; + MARKETING_VERSION = 1.0.21; OTHER_LDFLAGS = ( "$(inherited)", "-l\"c++\"", @@ -2540,7 +2540,7 @@ CODE_SIGN_ENTITLEMENTS = HDFwear/HDFwear.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 5; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = W7QH47B2TU; ENABLE_BITCODE = NO; "EXCLUDED_ARCHS[sdk=*]" = armv7; @@ -2586,7 +2586,7 @@ "$(PROJECT_DIR)/HDFwear/3rd/Mediatek", "$(PROJECT_DIR)/HDFwear/3rd/QWeather.framework", ); - MARKETING_VERSION = 1.0.20; + MARKETING_VERSION = 1.0.21; OTHER_LDFLAGS = ( "$(inherited)", "-l\"c++\"", diff --git a/HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate b/HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate index a833da9..5de98d3 100644 Binary files a/HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate and b/HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/HDFwear/Setting/DailSyncViewController.swift b/HDFwear/Setting/DailSyncViewController.swift index 24b4524..1c45292 100644 --- a/HDFwear/Setting/DailSyncViewController.swift +++ b/HDFwear/Setting/DailSyncViewController.swift @@ -40,6 +40,10 @@ class DailSyncViewController: UIViewController, XMLParserDelegate { var dialIndexPath = IndexPath(row: -1, section: -1) let platform = CurDevice.platform + + + + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) } @@ -100,10 +104,13 @@ class DailSyncViewController: UIViewController, XMLParserDelegate { func queryDialInfo() { Alamofire.SessionManager.default.session.configuration.requestCachePolicy = .reloadIgnoringLocalCacheData + Alamofire.SessionManager.default.session.configuration.urlCache = nil URLCache.shared.removeAllCachedResponses() - Alamofire.request("http://www.hodafone.com.cn/hodafone/dial/rtl/\(dialWidth)x\(dialHeight)/version.xml").responseData { responseData in + + Alamofire.SessionManager.default.request("http://www.hodafone.com.cn/hodafone/dial/rtl/\(dialWidth)x\(dialHeight)/version.xml").responseData { responseData in // if responseData.response?.statusCode == 400 { if let data = responseData.data { + URLCache.shared.removeAllCachedResponses() let parser = XMLParser(data: data) parser.delegate = self parser.parse() diff --git a/HDFwear/Tools/BluetoothManager.swift b/HDFwear/Tools/BluetoothManager.swift index 76d7059..becdca5 100644 --- a/HDFwear/Tools/BluetoothManager.swift +++ b/HDFwear/Tools/BluetoothManager.swift @@ -62,6 +62,7 @@ class BluetoothManager: NSObject { var setDataClosure: ((_ error: Int?) -> ())? var firmwareCallbackClosure: ((_ version: String, _ type: String, _ updateDic: [String: String], _ error: Int?) -> ())? var firmwareAlert: Bool = true + var firmwareAlertView: FirmwareRemindView? var delegateList: [BluetoothManagerDelegate] = [] var syncDelegateList: [BluetoothSyncDelegate] = [] @@ -1687,7 +1688,7 @@ extension BluetoothManager: CBCentralManagerDelegate { if peripheralDic.keys.contains(peripheral.identifier.uuidString) { return } - if peripheral.name?.range(of: "You 1_LE") != nil || peripheral.name?.range(of: "Pro_LE") != nil || peripheral.name?.range(of: "MTB025B") != nil || peripheral.name?.range(of: "MTB033B") != nil || peripheral.name?.range(of: "hq7") != nil || peripheral.name?.range(of: "D09") != nil || peripheral.name?.range(of: "P8GT") != nil || peripheral.name?.range(of: "hq8") != nil || peripheral.name?.range(of: "Watch 7") != nil || peripheral.name?.range(of: "D07") != nil || peripheral.name?.range(of: "S7 NO.1") != nil || peripheral.name?.range(of: "G7 Pro Max Gameboy") { + if peripheral.name?.range(of: "You 1_LE") != nil || peripheral.name?.range(of: "Pro_LE") != nil || peripheral.name?.range(of: "MTB025B") != nil || peripheral.name?.range(of: "MTB033B") != nil || peripheral.name?.range(of: "hq7") != nil || peripheral.name?.range(of: "D09") != nil || peripheral.name?.range(of: "P8GT") != nil || peripheral.name?.range(of: "hq8") != nil || peripheral.name?.range(of: "Watch 7") != nil || peripheral.name?.range(of: "D07") != nil || peripheral.name?.range(of: "S7 NO.1") != nil || peripheral.name?.range(of: "G7 Pro Max Gameboy") != nil { peripheralDic[peripheral.identifier.uuidString] = peripheral // print(peripheral.name)key String "kCBAdvDataServiceData" @@ -1783,12 +1784,16 @@ extension BluetoothManager: XMLParserDelegate { if let curVC = UIViewController.getCurrentViewController(), !(curVC is FirmwareUpdateVC) { // print(NSStringFromClass(type(of: curVC))) if firmwareAlert { - let view = FirmwareRemindView(title: LocString("版本更新"), detail: LocString("监测到你的手表当前使用的不是最新版本固件,为了不影响手表的正常使用,并给你带来更好的用户体验,请务必将手表更新至最新固件版本。"), sureText: LocString("去更新")) - view.show() - view.clickClosure = { index in - let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Setting", identifier: "FirmwareUpdateVC") - curVC.navigationController?.pushViewController(vc, animated: true) + if firmwareAlertView == nil { + firmwareAlertView = FirmwareRemindView(title: LocString("版本更新"), detail: LocString("监测到你的手表当前使用的不是最新版本固件,为了不影响手表的正常使用,并给你带来更好的用户体验,请务必将手表更新至最新固件版本。"), sureText: LocString("去更新")) + self.firmwareAlertView?.show() + self.firmwareAlertView?.clickClosure = {[weak self] index in + self?.firmwareAlertView = nil + let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Setting", identifier: "FirmwareUpdateVC") + curVC.navigationController?.pushViewController(vc, animated: true) + } } + } } } else { -- libgit2 0.21.4