Cannot build a project when both Xcode 15 & Xcode 16 are installed

I wanted to try running my project using Xcode 16 - I am using beta 4.It seems I cannot have both Xcode 15 & 16 installed at the same time.

I have a project with visionOS & iOS build targets.

The following error occurs in Xcode 16:

/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift/bridging.modulemap:13:8 redefinition of module 'SwiftBridging'

I did try removing Xcode 15 as a test & that worked but that is not a solution.

Is there a way I can have both apps installed?

What version of macOS are you on? macOS Sequoia 15 Beta requires Xcode 16. To run both Xcode 15.4 and Xcode 16, you need to use macOS Sonoma 14.5.

I'm getting the same error when building with Xcode 16, but not with Xcode 15 (even when both versions are installed at the same time). I'm running macOS 14.6

Any ideas?

Cannot build a project when both Xcode 15 & Xcode 16 are installed
 
 
Q