[PR #2218] [MERGED] [EC-579] Apple Watch MVP iOS settings and activation #45038

Closed
opened 2026-04-26 12:15:52 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2218
Author: @fedemkr
Created: 12/3/2022
Status: Merged
Merged: 12/5/2022
Merged by: @fedemkr

Base: feature/apple-watch-mvpHead: feature/EC-579-apple-watch-mvp-ios-settings


📝 Commits (2)

  • 5087e86 EC-579 Added logic for Connect To Watch on iOS settings and moved it to the correct place. Also improved the synchronization and watch session activation logic
  • 35e80f6 Merge branch 'feature/apple-watch-mvp' into feature/EC-579-apple-watch-mvp-ios-settings

📊 Changes

15 files changed (+114 additions, -54 deletions)

View changed files

📝 src/Android/Services/DeviceActionService.cs (+0 -2)
📝 src/Android/Services/WatchDeviceService.cs (+6 -1)
📝 src/App/Abstractions/IDeviceActionService.cs (+0 -1)
📝 src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs (+28 -32)
📝 src/App/Services/BaseWatchDeviceService.cs (+31 -3)
📝 src/Core/Abstractions/IStateService.cs (+2 -0)
📝 src/Core/Abstractions/IWatchDeviceService.cs (+3 -0)
📝 src/Core/Constants.cs (+1 -0)
📝 src/Core/Enums/WatchState.cs (+1 -1)
📝 src/Core/Services/StateService.cs (+16 -0)
📝 src/iOS.Core/Services/DeviceActionService.cs (+0 -6)
📝 src/iOS.Core/Services/WatchDeviceService.cs (+9 -0)
📝 src/iOS.Core/Utilities/WCSessionManager.cs (+2 -0)
📝 src/iOS/AppDelegate.cs (+10 -3)
📝 src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/BWState.swift (+5 -5)

📄 Description

Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

Implement iOS setting for "Connect to Watch" and also added logic to handle activation of the watch communication session accordingly.

Code changes

  • SettingsPageViewModel: Moved "Connect to Watch" to the proper place, implemented toggle Watch connection
  • StateService: Added ShouldConnectToWatch flag to be used alongside with the watch sync and to see if the watch communication session should be activated or not.
  • BaseWatchDeviceService: Implemented logic to check the aforementioned flag to know whether to sync data or not and whether the connection should be activated. Also to signal the watch to wipe the data when the connection is turned off from iOS app settings.
  • AppDelegate: Check the flag to see if the watch connection should be activated depending on the current account
  • Watch -> BWState: Rearranged the flag raw values given that NeedUnlock was removed/commented out

Screenshots

Connect to Watch iOS Settings

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2218 **Author:** [@fedemkr](https://github.com/fedemkr) **Created:** 12/3/2022 **Status:** ✅ Merged **Merged:** 12/5/2022 **Merged by:** [@fedemkr](https://github.com/fedemkr) **Base:** `feature/apple-watch-mvp` ← **Head:** `feature/EC-579-apple-watch-mvp-ios-settings` --- ### 📝 Commits (2) - [`5087e86`](https://github.com/bitwarden/android/commit/5087e86fe390863e7e39ae881b562fab29907b19) EC-579 Added logic for Connect To Watch on iOS settings and moved it to the correct place. Also improved the synchronization and watch session activation logic - [`35e80f6`](https://github.com/bitwarden/android/commit/35e80f6572bbdf61f27e889dc4298d790702149b) Merge branch 'feature/apple-watch-mvp' into feature/EC-579-apple-watch-mvp-ios-settings ### 📊 Changes **15 files changed** (+114 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Services/DeviceActionService.cs` (+0 -2) 📝 `src/Android/Services/WatchDeviceService.cs` (+6 -1) 📝 `src/App/Abstractions/IDeviceActionService.cs` (+0 -1) 📝 `src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs` (+28 -32) 📝 `src/App/Services/BaseWatchDeviceService.cs` (+31 -3) 📝 `src/Core/Abstractions/IStateService.cs` (+2 -0) 📝 `src/Core/Abstractions/IWatchDeviceService.cs` (+3 -0) 📝 `src/Core/Constants.cs` (+1 -0) 📝 `src/Core/Enums/WatchState.cs` (+1 -1) 📝 `src/Core/Services/StateService.cs` (+16 -0) 📝 `src/iOS.Core/Services/DeviceActionService.cs` (+0 -6) 📝 `src/iOS.Core/Services/WatchDeviceService.cs` (+9 -0) 📝 `src/iOS.Core/Utilities/WCSessionManager.cs` (+2 -0) 📝 `src/iOS/AppDelegate.cs` (+10 -3) 📝 `src/watchOS/bitwarden/bitwarden WatchKit Extension/Utilities/BWState.swift` (+5 -5) </details> ### 📄 Description ## Type of change - [ ] Bug fix - [X] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> Implement iOS setting for "Connect to Watch" and also added logic to handle activation of the watch communication session accordingly. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **SettingsPageViewModel:** Moved "Connect to Watch" to the proper place, implemented toggle Watch connection * **StateService:** Added `ShouldConnectToWatch` flag to be used alongside with the watch sync and to see if the watch communication session should be activated or not. * **BaseWatchDeviceService:** Implemented logic to check the aforementioned flag to know whether to sync data or not and whether the connection should be activated. Also to signal the watch to wipe the data when the connection is turned off from iOS app settings. * **AppDelegate:** Check the flag to see if the watch connection should be activated depending on the current account * **Watch -> BWState:** Rearranged the flag raw values given that `NeedUnlock` was removed/commented out ## Screenshots <!--Required for any UI changes. Delete if not applicable--> <img width="314" alt="Connect to Watch iOS Settings" src="https://user-images.githubusercontent.com/15682323/205414248-81ae2fa7-c3cb-47d8-ae46-2192560cf19a.jpeg"> ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-26 12:15:52 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#45038