Multiple configured targets of 'x' are being created for macOS

Since updating to Xcode 11.4, I can't build my mac catalyst app anymore:

multiple configured targets of 'SwiftPackage1' are being created for macOS

I don't find this error message very helpful for what I should do to fix this.

My app has 2 swift packages set to "iOS + macOS" and an iMessage app set to "iOS". Also, if I try to click delete on the swift package, Xcode just crashes instead...

2 Likes

Unfortunately, this is a known issue in 11.4.

@NeoNacho Do we know when that will be fixed?

He may not be able to tell you, as an Apple employee. Unless it's fixed in Xcode 11.5 (you should give it a try), we likely won't see a fix until Xcode 12 in the fall, if at all.

I see, thanks! I tried 11.5 but no luck. Looks like we have to wait for 12.

I narrowed down the cause further. The bug seems to be that the package is also being used by the iMessage app (even though the iMessage app is not for mac).

Workaround:
Delete the package from the iMessage app, and you can build the Mac app again. Then you can re-add the package to the iMessage app when you build for iOS.

1 Like

Experiencing the exact same error and landed here (Xcode 11.5). The suggestion to remove the framework from all other targets did work for me though of course it's a very annoying workaround and isn't going to work long term.

Edit: Can confirm this issue is fixed in Xcode 12

1 Like

I am starting seeing this problem for the first time in Xcode 12 beta 5. My package contains GUI elements, and it is when I try to view the GUI elements in the canvas that the error comes. It builds and runs fine on the real hardware, and also in the simulator.

Has anyone got an idea or workaround for this?

1 Like

The issue still happens for me in Xcode 12.

There is an app and an app clip embedded into the app in my case, both have the same dependency. If the app is build for maccatalyst target - the error occurs. I guess removing the app clip solves the issue as it is not really needed for maccatalyst for now. But yeah, the error message is pretty confusing.

Terms of Service

Privacy Policy

Cookie Policy