Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Build Single Project in Xcode Workspace

Tags:

xcode

ios

I have XCode Workspace in which i have many Projects. I don't want to build entire workspace every time. How can I build a single Project in Xcode Workspace?

In Visual Studio i can right click on project and select project only->Build but i didn't find any option in XCode..

like image 992
bhawesh Avatar asked Apr 16 '13 12:04

bhawesh


People also ask

How to add exist project into Xcode workspace?

How To Add Exist Project Into Xcode Workspace. Launch Xcode and open the workspace file in it. Click File —> Add Files to “Workspace name” ( for example Add Files to “iOSExampleWorkSpace”…) menu item at Xcode top menu bar. Select the Xcode project file ( with file extension .xcodeproj ) in the project saved folder.

How do I create a project in Xcode?

1 Launch Xcode and open the workspace file in it. 2 Click File —> Add Files to “Workspace name” menu item at Xcode top menu bar. 3 Select the Xcode project file ( with file extension .xcodeproj ) in the project saved folder. ... 4 Now you can see the exist Xcode project has been added in the workspace in left navigator pane. ... More items...

Are all Xcode projects in the same directory?

By default, all the Xcode projects in a workspace are built in the same directory, referred to as the workspace build directory. Each workspace has its own build directory. Because all of the files in all of the projects in a workspace are in the same build directory, all of these files are visible to each project.

How do I change the location of a project in Xcode?

Open an Xcode project. Click File —> Project Settings… menu item at top menu bar. In the popup Shared Project Settings dialog, the Derived Data drop-down list contains three items, the second item is Project-relative Location. Others are similar to the Shared Workspace Settings dialog.


2 Answers

You probably should do it with schemes. Open scheme and remove unwanted targets. From Build section.
enter image description here

enter image description here

like image 172
DanSkeel Avatar answered Oct 27 '22 04:10

DanSkeel


You can create a scheme for that. For reference: XCode Scheme

I tried creating a workspace and added two projects in it. It appeared on the Menu (From which you select between device and simulators) for which project I want to fire build action.

like image 26
viral Avatar answered Oct 27 '22 05:10

viral