Commit 16781fcad54566daa470d5bf12f405239b876f8a
1 parent
f2cf74c7
1.0.20(5)
Showing
4 changed files
with
23 additions
and
11 deletions
HDFwear.xcodeproj/project.pbxproj
... | ... | @@ -2441,7 +2441,7 @@ |
2441 | 2441 | CODE_SIGN_ENTITLEMENTS = HDFwear/HDFwear.entitlements; |
2442 | 2442 | CODE_SIGN_IDENTITY = "Apple Development"; |
2443 | 2443 | CODE_SIGN_STYLE = Automatic; |
2444 | - CURRENT_PROJECT_VERSION = 5; | |
2444 | + CURRENT_PROJECT_VERSION = 1; | |
2445 | 2445 | DEVELOPMENT_TEAM = W7QH47B2TU; |
2446 | 2446 | ENABLE_BITCODE = NO; |
2447 | 2447 | "EXCLUDED_ARCHS[sdk=*]" = armv7; |
... | ... | @@ -2485,7 +2485,7 @@ |
2485 | 2485 | "$(PROJECT_DIR)/HDFwear/3rd/Mediatek", |
2486 | 2486 | "$(PROJECT_DIR)/HDFwear/3rd/QWeather.framework", |
2487 | 2487 | ); |
2488 | - MARKETING_VERSION = 1.0.20; | |
2488 | + MARKETING_VERSION = 1.0.21; | |
2489 | 2489 | OTHER_LDFLAGS = ( |
2490 | 2490 | "$(inherited)", |
2491 | 2491 | "-l\"c++\"", |
... | ... | @@ -2540,7 +2540,7 @@ |
2540 | 2540 | CODE_SIGN_ENTITLEMENTS = HDFwear/HDFwear.entitlements; |
2541 | 2541 | CODE_SIGN_IDENTITY = "Apple Development"; |
2542 | 2542 | CODE_SIGN_STYLE = Automatic; |
2543 | - CURRENT_PROJECT_VERSION = 5; | |
2543 | + CURRENT_PROJECT_VERSION = 1; | |
2544 | 2544 | DEVELOPMENT_TEAM = W7QH47B2TU; |
2545 | 2545 | ENABLE_BITCODE = NO; |
2546 | 2546 | "EXCLUDED_ARCHS[sdk=*]" = armv7; |
... | ... | @@ -2586,7 +2586,7 @@ |
2586 | 2586 | "$(PROJECT_DIR)/HDFwear/3rd/Mediatek", |
2587 | 2587 | "$(PROJECT_DIR)/HDFwear/3rd/QWeather.framework", |
2588 | 2588 | ); |
2589 | - MARKETING_VERSION = 1.0.20; | |
2589 | + MARKETING_VERSION = 1.0.21; | |
2590 | 2590 | OTHER_LDFLAGS = ( |
2591 | 2591 | "$(inherited)", |
2592 | 2592 | "-l\"c++\"", | ... | ... |
HDFwear.xcworkspace/xcuserdata/yangbin.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
HDFwear/Setting/DailSyncViewController.swift
... | ... | @@ -40,6 +40,10 @@ class DailSyncViewController: UIViewController, XMLParserDelegate { |
40 | 40 | var dialIndexPath = IndexPath(row: -1, section: -1) |
41 | 41 | let platform = CurDevice.platform |
42 | 42 | |
43 | + | |
44 | + | |
45 | + | |
46 | + | |
43 | 47 | override func viewWillAppear(_ animated: Bool) { |
44 | 48 | super.viewWillAppear(animated) |
45 | 49 | } |
... | ... | @@ -100,10 +104,13 @@ class DailSyncViewController: UIViewController, XMLParserDelegate { |
100 | 104 | |
101 | 105 | func queryDialInfo() { |
102 | 106 | Alamofire.SessionManager.default.session.configuration.requestCachePolicy = .reloadIgnoringLocalCacheData |
107 | + Alamofire.SessionManager.default.session.configuration.urlCache = nil | |
103 | 108 | URLCache.shared.removeAllCachedResponses() |
104 | - Alamofire.request("http://www.hodafone.com.cn/hodafone/dial/rtl/\(dialWidth)x\(dialHeight)/version.xml").responseData { responseData in | |
109 | + | |
110 | + Alamofire.SessionManager.default.request("http://www.hodafone.com.cn/hodafone/dial/rtl/\(dialWidth)x\(dialHeight)/version.xml").responseData { responseData in | |
105 | 111 | // if responseData.response?.statusCode == 400 { |
106 | 112 | if let data = responseData.data { |
113 | + URLCache.shared.removeAllCachedResponses() | |
107 | 114 | let parser = XMLParser(data: data) |
108 | 115 | parser.delegate = self |
109 | 116 | parser.parse() | ... | ... |
HDFwear/Tools/BluetoothManager.swift
... | ... | @@ -62,6 +62,7 @@ class BluetoothManager: NSObject { |
62 | 62 | var setDataClosure: ((_ error: Int?) -> ())? |
63 | 63 | var firmwareCallbackClosure: ((_ version: String, _ type: String, _ updateDic: [String: String], _ error: Int?) -> ())? |
64 | 64 | var firmwareAlert: Bool = true |
65 | + var firmwareAlertView: FirmwareRemindView? | |
65 | 66 | |
66 | 67 | var delegateList: [BluetoothManagerDelegate] = [] |
67 | 68 | var syncDelegateList: [BluetoothSyncDelegate] = [] |
... | ... | @@ -1687,7 +1688,7 @@ extension BluetoothManager: CBCentralManagerDelegate { |
1687 | 1688 | if peripheralDic.keys.contains(peripheral.identifier.uuidString) { |
1688 | 1689 | return |
1689 | 1690 | } |
1690 | - 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") { | |
1691 | + 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 { | |
1691 | 1692 | peripheralDic[peripheral.identifier.uuidString] = peripheral |
1692 | 1693 | // print(peripheral.name)key String "kCBAdvDataServiceData" |
1693 | 1694 | |
... | ... | @@ -1783,12 +1784,16 @@ extension BluetoothManager: XMLParserDelegate { |
1783 | 1784 | if let curVC = UIViewController.getCurrentViewController(), !(curVC is FirmwareUpdateVC) { |
1784 | 1785 | // print(NSStringFromClass(type(of: curVC))) |
1785 | 1786 | if firmwareAlert { |
1786 | - let view = FirmwareRemindView(title: LocString("版本更新"), detail: LocString("监测到你的手表当前使用的不是最新版本固件,为了不影响手表的正常使用,并给你带来更好的用户体验,请务必将手表更新至最新固件版本。"), sureText: LocString("去更新")) | |
1787 | - view.show() | |
1788 | - view.clickClosure = { index in | |
1789 | - let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Setting", identifier: "FirmwareUpdateVC") | |
1790 | - curVC.navigationController?.pushViewController(vc, animated: true) | |
1787 | + if firmwareAlertView == nil { | |
1788 | + firmwareAlertView = FirmwareRemindView(title: LocString("版本更新"), detail: LocString("监测到你的手表当前使用的不是最新版本固件,为了不影响手表的正常使用,并给你带来更好的用户体验,请务必将手表更新至最新固件版本。"), sureText: LocString("去更新")) | |
1789 | + self.firmwareAlertView?.show() | |
1790 | + self.firmwareAlertView?.clickClosure = {[weak self] index in | |
1791 | + self?.firmwareAlertView = nil | |
1792 | + let vc = UIStoryboard.loadViewControllerIdentifier(storyboardName: "Setting", identifier: "FirmwareUpdateVC") | |
1793 | + curVC.navigationController?.pushViewController(vc, animated: true) | |
1794 | + } | |
1791 | 1795 | } |
1796 | + | |
1792 | 1797 | } |
1793 | 1798 | } |
1794 | 1799 | } else { | ... | ... |