You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
in_foreground is missing from MAUI events on iOS and Mac Catalyst apps using the UIScene lifecycle #5726
Sentry.Maui sets SentryMauiEventProcessor.InForeground from MAUI's application-level iOS lifecycle events: OnActivated, OnResignActivation and DidEnterBackground. Apps that use the UIScene lifecycle get SceneOnActivated, SceneOnResignActivation and SceneDidEnterBackground instead (see MauiUISceneDelegate in dotnet/maui). So InForeground stays null, and because the event processor writes it over the enricher's value, in_foreground is missing from every iOS and Mac Catalyst event.
This affects 6.x users now. Apps built with Xcode 27 must adopt the UIScene lifecycle, and that includes .NET 10 apps using the .NET 10 Xcode 27.0 support packs.
Fix
Already on version7 in #5725, commit fix(maui): report in_foreground for apps using the UIScene lifecycle, which registers the Scene* events alongside the application-level ones. It cherry-picks cleanly onto main.
That commit also asserts "in_foreground":true in integration-test/ios.Tests.ps1. On main, though, the iOS integration test app is integration-test/net9-maui, which doesn't use scenes. The old application-level handlers still set InForeground there, so the assertion would pass even without the fix. To make it guard the fix, adopt the UIScene lifecycle in net9-maui as #5725 did for integration-test/maui-device:
a UIApplicationSceneManifest in Platforms/iOS/Info.plist;
an empty SceneDelegate : MauiUISceneDelegate;
the app's OnActivated test hook moved from AppDelegate to that SceneDelegate, because UIKit stops calling the application-level one under scenes.
This works under Xcode 26.6, so main's CI exercises it.
Activity
linear-code commentedon Oct 14, 2026
NET-868
fix(maui): report in_foreground for apps using the UIScene lifecycle (#…
Merge main into version7 (#5748)
docs: hand-written release notes for 7.0.0 (#5749)