From 43166bcd6479a179f160c63a408acb8dfc96ad8c Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 20 Aug 2025 18:09:57 +0200 Subject: [PATCH] iOS: keep mesh alive in background; remove stopServices() on scenePhase .background so incoming messages can still arrive and trigger notifications. --- bitchat/BitchatApp.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitchat/BitchatApp.swift b/bitchat/BitchatApp.swift index 7a1af865..b7a8a1d9 100644 --- a/bitchat/BitchatApp.swift +++ b/bitchat/BitchatApp.swift @@ -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()