Martin Muldoon
Martin Muldoon

Reputation: 3428

Merging two Xcode projects... Workspaces / Schemes?

I have two projects. One is written in Swift 3, while the other is written in Objective C. Both compile and run fine.

I have tried to add the Objective C project into Swift by adding files to the project. The project won't build because it can't import the bridging header. I have spent two days on this and am certain that I am correctly specifying the location of the bridging header and header files under build settings. I'm now looking for an alternative approach to merging these projects.

From Apple: In addition to organizing all the files in each Xcode project, a workspace provides implicit and explicit relationships among the included projects and their targets.

Does this mean if I add the two projects to a Workspace that I can build the two targets into one target resulting in one product? I read something about using schemes, but the post wasn't detailed. I'm running Xcode 8 and Swift 3.

Thanks.

Upvotes: 0

Views: 1467

Answers (1)

Jeyamahesan
Jeyamahesan

Reputation: 1111

Workspace is used to maintain multiple projects in single space.It wont merge two projects and create a single target/product.

Simple way to add bridging header, create a new ObjectiveC/Swift file in the project will prompt "Would you like to configure an Objective-C bridging header?" dialog by xcode, will automatically create the "yourprojectname-Swift.h" file for you.

Upvotes: 1

Related Questions