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
MPAppDelegateProxy does not receive events when using a UIApplicationDelegateAdaptor in a SwiftUI App #207
We attempted to migrate to a SwiftUI App for our application's main entry point, and we wanted to continue to leverage the SDK's automatic handling of UIApplicationDelegate events. SwiftUI supports UIKit app delegates through the UIApplicationDelegateAdaptor, so we used this hoping to preserve existing functionality from the MParticle SDK.
Unfortunately, doing so causes the application to crash after logging the following message:
Could not cast value of type 'MPAppDelegateProxy' (0x10d00ac38) to 'SwiftUI.AppDelegate' (0x113e93708)
Is there a way the MPAppDelegateProxy could be updated to support the SwiftUI UIApplicationDelegateAdaptor?
Closing — this was addressed by the 9.0.0 release, which fully removed AppDelegateProxy and the app-delegate-proxying mechanism that caused this crash (see the "Removed AppDelegateProxy" section of MIGRATING.md: https://github.com/mParticle/mparticle-apple-sdk/blob/main/MIGRATING.md). Apps should now forward delegate/scene events explicitly. For broader UIScene lifecycle adoption guidance, follow #431. Reopen if you're still seeing this on 9.x.
Activity
nickolas-dimitrakas commentedon Sep 17, 2026
Closing — this was addressed by the 9.0.0 release, which fully removed AppDelegateProxy and the app-delegate-proxying mechanism that caused this crash (see the "Removed AppDelegateProxy" section of MIGRATING.md: https://github.com/mParticle/mparticle-apple-sdk/blob/main/MIGRATING.md). Apps should now forward delegate/scene events explicitly. For broader UIScene lifecycle adoption guidance, follow #431. Reopen if you're still seeing this on 9.x.