diff --git a/SiliconLabsApp.xcodeproj/project.pbxproj b/SiliconLabsApp.xcodeproj/project.pbxproj index 5f64cad6..2d1583b6 100644 --- a/SiliconLabsApp.xcodeproj/project.pbxproj +++ b/SiliconLabsApp.xcodeproj/project.pbxproj @@ -939,6 +939,7 @@ 4D9E26262212CA7000617DBA /* SILRangeTestBoardInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D9E26242212CA7000617DBA /* SILRangeTestBoardInfo.swift */; }; 4D9E26272212CA7000617DBA /* SILRangeTestBoardInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D9E26242212CA7000617DBA /* SILRangeTestBoardInfo.swift */; }; 721423922AD69E8B00DC3FA2 /* PlugViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 721423912AD69E8B00DC3FA2 /* PlugViewController.m */; }; + 724CB4D42BD7DEBE003E9A99 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 724CB4D32BD7DEBE003E9A99 /* PrivacyInfo.xcprivacy */; }; 7254545F2ACC1710003967CA /* Cluster.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7254545E2ACC1710003967CA /* Cluster.storyboard */; }; 725454622ACC82B9003967CA /* WindowOpenCloseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 725454612ACC82B9003967CA /* WindowOpenCloseViewController.m */; }; 725454652ACC8486003967CA /* DoorLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 725454642ACC8486003967CA /* DoorLockViewController.m */; }; @@ -1947,6 +1948,7 @@ 721423902AD69E8B00DC3FA2 /* PlugViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlugViewController.h; sourceTree = ""; }; 721423912AD69E8B00DC3FA2 /* PlugViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlugViewController.m; sourceTree = ""; }; 722F5EF560719504746B876B /* Pods-BlueGecko.release-wireless-gecko.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-BlueGecko.release-wireless-gecko.xcconfig"; path = "Pods/Target Support Files/Pods-BlueGecko/Pods-BlueGecko.release-wireless-gecko.xcconfig"; sourceTree = ""; }; + 724CB4D32BD7DEBE003E9A99 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 7254545E2ACC1710003967CA /* Cluster.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Cluster.storyboard; sourceTree = ""; }; 725454602ACC82B9003967CA /* WindowOpenCloseViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WindowOpenCloseViewController.h; sourceTree = ""; }; 725454612ACC82B9003967CA /* WindowOpenCloseViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WindowOpenCloseViewController.m; sourceTree = ""; }; @@ -5104,6 +5106,7 @@ E6CAA2231A64011900A49DAF /* Supporting Files */, FE36FC6B2864783B00A9CB41 /* SILAppDelegate.swift */, 498311D31BF29A5400D49FF2 /* SILCharacteristicEditEnabler.h */, + 724CB4D32BD7DEBE003E9A99 /* PrivacyInfo.xcprivacy */, ); path = SiliconLabsApp; sourceTree = ""; @@ -5389,6 +5392,7 @@ 4C9EAB5F24042FB00023FFB1 /* Roboto-LightItalic.ttf in Resources */, 1E1457FF266E0579009792C2 /* SILAppTypeThroughput.storyboard in Resources */, 2051321A270365A800C27B92 /* Assets.xcassets in Resources */, + 724CB4D42BD7DEBE003E9A99 /* PrivacyInfo.xcprivacy in Resources */, 0C2FCBB81F9A542300F4F259 /* SILDebugAdvDetailsViewController.xib in Resources */, 4C95EB7723FEC8600091FB5A /* SILAppBluetoothBrowserDetails.storyboard in Resources */, 0C2FCBB91F9A542300F4F259 /* SILRetailBeaconDetailsViewController.xib in Resources */, @@ -6910,7 +6914,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_RESOURCE_RULES_PATH = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = 52444FG85C; DISPLAY_NAME = "EFR Connect"; @@ -6928,7 +6932,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.1; + MARKETING_VERSION = 2.8.2; PRODUCT_BUNDLE_IDENTIFIER = com.silabs.BlueGeckoDemoApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -6952,7 +6956,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_RESOURCE_RULES_PATH = ""; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 11; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 52444FG85C; @@ -6970,7 +6974,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 2.8.1; + MARKETING_VERSION = 2.8.2; PRODUCT_BUNDLE_IDENTIFIER = com.silabs.BlueGeckoDemoApp; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = "BlueGeckoDemoApp Distribution"; diff --git a/SiliconLabsApp/Models/SILBlinkyPeripheralDelegate.swift b/SiliconLabsApp/Models/SILBlinkyPeripheralDelegate.swift index 0aec0051..6ee956e9 100644 --- a/SiliconLabsApp/Models/SILBlinkyPeripheralDelegate.swift +++ b/SiliconLabsApp/Models/SILBlinkyPeripheralDelegate.swift @@ -296,6 +296,8 @@ class SILBlinkyPeripheralDelegate: NSObject, CBPeripheralDelegate { return } + // battery level + UserDefaults.standard.set(Int(value), forKey: "initialBatteryLevel") self.updatePower(batteryLevel: Int(value)) updateStateIfIsInitiated() } diff --git a/SiliconLabsApp/PrivacyInfo.xcprivacy b/SiliconLabsApp/PrivacyInfo.xcprivacy new file mode 100644 index 00000000..fcfc3663 --- /dev/null +++ b/SiliconLabsApp/PrivacyInfo.xcprivacy @@ -0,0 +1,20 @@ + + + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + 85F4.1 + 3B52.1 + 35F9.1 + 1C8F.1 + + + + + diff --git a/SiliconLabsApp/ThunderBoard/Navigation/ConnectedDeviceBarView.swift b/SiliconLabsApp/ThunderBoard/Navigation/ConnectedDeviceBarView.swift index fb3230fb..5321098f 100644 --- a/SiliconLabsApp/ThunderBoard/Navigation/ConnectedDeviceBarView.swift +++ b/SiliconLabsApp/ThunderBoard/Navigation/ConnectedDeviceBarView.swift @@ -16,6 +16,7 @@ class ConnectedDeviceBarView: UIView { @IBOutlet weak var batteryStatusLabel: UILabel! @IBOutlet weak var batteryStatusImageView: BatteryIcon! @IBOutlet weak var firmwareVersionLabel: UILabel! + var defaultValue = 0 var level: Int = 0 { didSet { @@ -49,7 +50,12 @@ class ConnectedDeviceBarView: UIView { case .aa(let level): self.level = level case .coinCell(let level): - self.level = level + if level == defaultValue { + let initialBatteryLevel: Int = UserDefaults.standard.integer(forKey: "initialBatteryLevel") + self.level = initialBatteryLevel + } else { + self.level = level + } case .genericBattery(let level): self.level = level } diff --git a/SiliconLabsApp/ViewControllers/AppSelection/SILAppSelectionViewController.swift b/SiliconLabsApp/ViewControllers/AppSelection/SILAppSelectionViewController.swift index a9d9b5d5..276ed213 100644 --- a/SiliconLabsApp/ViewControllers/AppSelection/SILAppSelectionViewController.swift +++ b/SiliconLabsApp/ViewControllers/AppSelection/SILAppSelectionViewController.swift @@ -110,7 +110,6 @@ class SILAppSelectionViewController : UIViewController, UICollectionViewDataSour if let viewController = storyboard.instantiateInitialViewController() { self.navigationController?.pushViewController(viewController, animated: animated) } - } private func showRSSIGraph(app: SILApp!, animated: Bool) { @@ -406,4 +405,13 @@ class SILAppSelectionViewController : UIViewController, UICollectionViewDataSour self.navigationController?.pushViewController(demoViewController, animated: true) } } + +// func dismissView(devicePopover: WYPopoverController) { +// print("dismiss popup mantosh ") +// DispatchQueue.main.asyncAfter(deadline: .now() + 1) { +// self.didDismissSILWifiOTAConfigViewController() +// self.didDismissDeviceSelectionViewController() +// print("deleted popup mantosh ") +// } +// } } diff --git a/SiliconLabsApp/ViewControllers/Blinky/SILAppTypeBlinkyViewController.swift b/SiliconLabsApp/ViewControllers/Blinky/SILAppTypeBlinkyViewController.swift index 2e34e49a..a2ce281a 100644 --- a/SiliconLabsApp/ViewControllers/Blinky/SILAppTypeBlinkyViewController.swift +++ b/SiliconLabsApp/ViewControllers/Blinky/SILAppTypeBlinkyViewController.swift @@ -39,6 +39,7 @@ class SILAppTypeBlinkyViewController: UIViewController, ConnectedDeviceDelegate, super.viewDidDisappear(animated) viewModel?.removeObserverAndDisconnect() self.disposeBag.invalidateTokens() + UserDefaults.standard.removeObject(forKey: "initialBatteryLevel") } override func viewWillAppear(_ animated: Bool) { diff --git a/SiliconLabsApp/ViewControllers/ConnectedLightingApp/SILConnectedLightingViewController.m b/SiliconLabsApp/ViewControllers/ConnectedLightingApp/SILConnectedLightingViewController.m index 7c91b2db..8774bb41 100644 --- a/SiliconLabsApp/ViewControllers/ConnectedLightingApp/SILConnectedLightingViewController.m +++ b/SiliconLabsApp/ViewControllers/ConnectedLightingApp/SILConnectedLightingViewController.m @@ -49,6 +49,7 @@ @interface SILConnectedLightingViewController ()