Fix strap reconnect after updates#195
Open
khalilkm01 wants to merge 2 commits into
Open
Conversation
Updates could leave the Xcode build and installed app running at the same time, so both processes could compete for the WHOOP BLE connection. Keep the installed macOS app as the single active instance, rotate scans between WHOOP 4.0 and 5/MG when the selected service is stale, and persist the model that actually advertises.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
After updates, the installed app and the Xcode build could both be running. That creates a real BLE contention path: the strap is visible, but live data may not settle because two app copies can try to own the connection. A stale selected model can also leave the app scanning only the wrong WHOOP service.
Validation
xcodebuild build -project Strand.xcodeproj -scheme Strand -configuration Debug -destination platform=macOS,arch=arm64 -derivedDataPath /Users/kabir/Library/Developer/Xcode/DerivedData/Strand-dmpzazadcpaekqgcchpueyusvgha COMPILER_INDEX_STORE_ENABLE=NO ONLY_ACTIVE_ARCH=YES ARCHS=arm64No personal data or imported WHOOP exports are included.