iOS: keep mesh alive in background; remove stopServices() on scenePhase .background so incoming messages can still arrive and trigger notifications.

This commit is contained in:
jack
2025-08-20 18:09:57 +02:00
parent 496972dcc9
commit 43166bcd64
+2 -2
View File
@@ -44,8 +44,8 @@ struct BitchatApp: App {
.onChange(of: scenePhase) { newPhase in
switch newPhase {
case .background:
// Send leave message when going to background
chatViewModel.meshService.stopServices()
// Keep BLE mesh running in background; BLEService adapts scanning automatically
break
case .active:
// Restart services when becoming active
chatViewModel.meshService.startServices()