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
I'm encountering a crash in Release builds (and TestFlight) but not in Debug, with the error:
failed to demangle witness for associated type '' in conformance 'ComposableArchitecture._DependencyKeyWritingReducer<.AppFeature>: Reducer' from mangled name '5State�U$�' - unknown error @UIApplicationMain.
Context
Project Setup: iOS app using The Composable Architecture (TCA).
TCA Version: 1.22.2
Dependency Manager: SPM
Xcode Version: 16.1
Swift Version: Swift 5
iOS Target: 14.0+
The crash occurs during app launch in AppDelegate when initializing a TCA Store for AppFeature, a top-level reducer with nested feature states (HomeFeature, ChatsFeature, etc.). The AppFeature uses TCA macros (@Reducer, @ObservableState, @CasePathable) and scopes sub-reducers correctly. The Store is initialized as:
private(set) lazy var store = Store( initialState: AppFeature.State( home: HomeFeature.State(), reducer: { AppFeature() } )
@ObservableState
struct State: RouteObservable {
var selectedTab: MainTabBarItem = .home
var home: HomeFeature.State
var chats: ChatsFeature.State
// .. other states
var route: Route?
}
@CasePathable
enum Action: RouteAction {
case start
case selectTab(MainTabBarItem)
case home(HomeFeature.Action)
// ... other actions
}
var body: some Reducer<State, Action> {
Scope(state: \.home, action: \.home) { HomeFeature() }
Scope(state: \.chats, action: \.chats) { ChatsFeature() }
// ... other scopes
Reduce { state, action in
switch action {
case .start:
// Implementation
return .none
// ... other cases
}
}
}
}`
Has anyone seen this demangling error with TCA in Release/TestFlight? Any known fixes?
Could this be related to dependency manager setup SPM or framework linking?
Are there TCA-specific build settings to stabilize Release builds with macros?
Any help or pointers would be greatly appreciated! Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm encountering a crash in Release builds (and TestFlight) but not in Debug, with the error:
failed to demangle witness for associated type '' in conformance 'ComposableArchitecture._DependencyKeyWritingReducer<.AppFeature>: Reducer' from mangled name '5State�U$�' - unknown error @UIApplicationMain.
Context
Project Setup: iOS app using The Composable Architecture (TCA).
TCA Version: 1.22.2
Dependency Manager: SPM
Xcode Version: 16.1
Swift Version: Swift 5
iOS Target: 14.0+
The crash occurs during app launch in AppDelegate when initializing a TCA Store for AppFeature, a top-level reducer with nested feature states (HomeFeature, ChatsFeature, etc.). The AppFeature uses TCA macros (@Reducer, @ObservableState, @CasePathable) and scopes sub-reducers correctly. The Store is initialized as:
private(set) lazy var store = Store( initialState: AppFeature.State( home: HomeFeature.State(), reducer: { AppFeature() } )
AppFeature definition:
'
@Reducer
struct AppFeature {
}`
Has anyone seen this demangling error with TCA in Release/TestFlight? Any known fixes?
Could this be related to dependency manager setup SPM or framework linking?
Are there TCA-specific build settings to stabilize Release builds with macros?
Any help or pointers would be greatly appreciated! Thanks!
Beta Was this translation helpful? Give feedback.
All reactions