Symbol not found after updating dev machine to 14.6 with Xcode 16b4

Xcode seems to be linking with the wrong SwiftUI library after I updated my dev machine to 14.6.

When I launch my app from Xcode, I'm getting:

Symbol not found: _$s7SwiftUI6ButtonVA2A5LabelVyAA4TextVAA5ImageVGRszrlE_5image6actionACyAJGAA18LocalizedStringKeyV_AA0F8ResourceVyyctcfC Referenced from: <73AA74BB-A9CF-39C8-8007-B1487BDF10AE>

And I think that is SwiftUI 6 instead of SwiftUI 5, which it should be linking to since my app's deployment target is macOS 14.

Any ideas?

I've verified this on a second machine. Easy to see the issue by adding an image to your Assets and this piece of code:

Button("Test", image: .myImage, action: {})

This will build but crash on launch.

As a temporary work-around just to get your app building and running, you can declare the function yourself:

func Button(_ str: String, image: ImageResource, action: @escaping () -> () ) -> some View {
  Button(str, action: action)
}

Yep, that works. Here is the workaround:

@MainActor
func Button(_ str: String, image: ImageResource, action: @escaping () -> ()) -> some View {
	Button(action: action) {
		Label(str, image: image)
	}
}

Can you open a bug report with your test project attached? Once you open the bug report, please post the FB number here for my reference. I appreciate you sharing the workaround you found here.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

—Ed Ford,  DTS Engineer

Symbol not found after updating dev machine to 14.6 with Xcode 16b4
 
 
Q