Post

Replies

Boosts

Views

Activity

Reply to Illegal instruction: 4
I encountered this compiler failure while using XCode 13.4.1 on MacOS 12.6. The source of the problem seems to be when I try and compile this method that creates a SwiftUI toolbar. In order to get the compiler to stop failing I have to comment out this method. func buildToolbar() -> ToolbarItemGroup<some View> { ToolbarItemGroup(placement: .navigationBarTrailing) { Button(action: { viewModel.signOut() }, label: { Label(viewModel.resetLabel, systemImage: "clear") .labelStyle(.titleOnly) } ) .confirmationDialog( "Are you sure?", isPresented: $viewModel.isConfirmPresented, titleVisibility: .visible ) { Button("Not now", role: .cancel) { } Button("Reset", role: .destructive) { viewModel.didConfirmSignOut() } } message: { if viewModel.isSomething { Text("This will sign out of your account and will clear all [REDACTED] } else { Text("This will attempt to deregister any accounts with the [REDACTOED] } } } }
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’22