-
-
Notifications
You must be signed in to change notification settings - Fork 198
Accessorymanager background discovery #1542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses crashes caused by appending new devices to the discovery list when the app is in the background. The solution introduces a background state flag that prevents device list modifications during background/inactive states.
Key Changes
- Added
isInBackgroundflag tracking inAccessoryManagerbased on scene phase - Version bumped from 2.7.6 to 2.7.7 across all targets
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Meshtastic/MeshtasticApp.swift | Added logic to set accessoryManager.isInBackground flag when scene phase changes, preventing device discovery updates when app is not active |
| Meshtastic.xcodeproj/project.pbxproj | Updated marketing version from 2.7.6 to 2.7.7 across all build configurations and targets |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
|
@garthvh FYI this change seems to break automatic reconnection when the app is in the background: Test sequence:
With this PR, it just stops at |
Don't append new devices to the list of discovered devices if the app is in the background, seems to cause crashes