Remove -cal target from Xcode - xcode

Setting up an Xcode project for testing with Calabash. How can I remove the -cal target completely. There is already a -cal target in the repository that is quite old. I would like to set up fresh but it seems to create another -cal target when I run setup. Any thoughts? Xcode 6.

The -cal schemes appear in 2 separate locations in Xcode. The first location is to the right of the build button. Click on the -cal scheme then go to Manage schemes and delete it from there. To get the second location, click on the Show Project Navigator and then choose the name of the -cal scheme you used in the left pane (there should also be one called Pods that is automatically generated). Then look under Targets in the Build Settings pane and you will be able to delete the second -cal scheme.

Related

How to make Xcode Archive use the right configuration information?

My Mac app has two Targets. When I attempt to Archive the second Target, Xcode always uses the configuration info for the first Target (Bundle ID, Version, and Build) even though I have selected the second Target.
By configuration I mean the "General" options displayed when clicking on the project name in the Project Navigator.
I was using the wrong scheme (whatever that is). To set the right scheme, use the Scheme menu (just to the right of the square Stop button on Xcode's menu bar).

How do I embed projects using Xcode 10?

I've been searching the internet for hours trying to figure this out. In previous versions of Xcode, I could drag a .xcodeproj file onto my workspace, and the groups, etc. of that project would be in the main one. That is, its sources and products would be accessible in the parent project. I mean to do this for a new private framework of mine, but it seems that in Xcode 10.2.1, this behavior is changed.
When I follow the instructions found in Apple's archived documentation (all that seems to survive), the .xcodeproj file sits alone in my file inspector. No reference hierarchy, and nothing happens when I click on it. On top of that, that project's frameworks are not accessible to the parent project.
Has anyone here figured out how this changed in Xcode 10, and what we are to do about it now? Many thanks!
This certainly feels like a workaround, but it does seem to work:
Open one of the projects you want to be in the final workspace
From the "File" menu choose "Save As Workspace…" and save it somewhere on disk
This will create a new workspace that looks identical to the Xcode project you originally opened.
From the "File" menu choose "Add files to “WorkspaceName“…" and select the next project you want in the workspace
At this point it will probably put the newly added project "inside" of the existing one in the file navigator pane. Simply drag it out to the top level and it will be on the same level as the original project. You should be able to twirl open the disclosure triangle and see the source files it contains. Clicking on the project will show the targets it contains.
Repeat as necessary for the remaining Xcode projects
As you add projects, the schemes from each project will show up in the popup menu under the scheme button in the toolbar.

Xcode: Project and Target, add resources to target?

I'm building my first app and I'm a bit confused about all the project and target settings. So far I understand that a project can have multiple targets, for example a lite and a full version. So first I'm building my full version and later on adjusting it for the lite one.
My question is now about the resources you add to the targets. So far I've never checked the checkbox "Add to target …" while adding images, fonts etc. Still it works fine. So why or why shouldn't I check this box? And if I need to check it, how can I do this for all the images etc. I've added to the project?
And I think in my resource folder are still some resources I don't need anymore and actually deleted in Xcode (correctly, not just deleting the link basically)..how can I get rid of them?
When you add a file/resource in Xcode (either using "New File" or "Add File to "), you will see a checkbox for all the targets in your project. You can check the ones that you want to include the new file/resource. For the existing file/resources in xcode, you have following two options:
For your target->Build Phases->Copy Bundle Resources, you can add resources to the target.
Click on the file/resource in project navigator, under "Utility View"->Target Membership, you can select/deselect the targets that need to include/remove this file/resource.
Regarding deleting resources, when you delete a resource or any file in XCode, it will give you options: "Remove Reference" or "Move to Trash". For both of these options, resource will be removed from all the targets and XCode project file. However, if you choose "Move to Trash" it will also be removed from the folder in your hard disk.

Xcode 4.x adding new Project to a Workspace

One would think that adding a project to a Workspace in Xcode would be intuitive.
1) But when you add a new project it is added within the existing project - It must be a bug, or is there actually a reason.
2) How do you add a project then (ctr + right click et.)
You could use the plus (+) button on the lower left corner of Xcode IDE to add a new project to a workspace. You must have first a blank workspace, which you could use the menu (New/Workspaces with short cuts ^%N).
To morning I spend some time doing what you asked to. so here are the steps (you can skip if you already have followed some).
Create a new blank work space
Add a project to it by clicking File->Add new files to "Your workSpace" or "command+option+A"
Choose your project folder Or yourproject.xcodeproj file
Just let the indexing finish properly, and congratulations you have added a new project to your xcode work space successfully.
Note: Make sure that project which you are adding is not already opened, Xcode get lil sensitive about that and doesn't show files tree in workspace in that case.
My answer pertains to XCode 5, but should pertain to XCode 4 as well.
In typical Apple fashion, they have given you multiple ways to do the almost the same thing. Very confusing and annoying. There are three ways, and only one way pertains to the original posters question:
(1) Use File --> Add Files to ...
Problem with this, is that it will only add files to workspace if NO project has been selected.
Problem with THAT, is that once you select a project, there is no way I know of to unselect it.
(2) Use the "+" in the lower-left corner.
Problem with that, it is equivalent to using the pull down menu (#1 above)
(3) Right click in the left pane (in an empty area), and you will see "Add files to "
This is the only right way to do it, as it guarantees that the file will be added to the workspace, and not any selected project.
Try all three methods after selecting an existing project, and you will see what I mean.
Based on my previous experience with XCode, Apple will take about 10 more years to fix this sort of thing.
One would think that adding a project to a Workspace in Xcode would be
intuitive.
Of course not, this is Apple, only usable for certain experts...
1) But when you add a new project it is added within the existing project -
It must be a bug, or is there actually a reason
You did miss the drop down selection list "Add to:" in the last of three dialog pages, the place where the location of the .xcodeproj file is specified. There you can select the Workspace you are currently using. So simply use "File" "New..." "Project...", give it a name and select from templates, and NEVER intuitiveley double click on the directory where to place the project file, but be sure to adjust the selection drop down list to your currently open workspace. Of course this choice is never preselected.

Why doesn't Xcode 4 create any products?

Regardless of build configuration, building my iPad app does not actually output a .app file. It does run in the iPad simulator and on a device, but when I hit build or build and run, the binary appears under Products in red and is not created in the "build" folder as designated in build settings.
Any ideas?
Xcode 4 places its build products and other intermediaries/temporary files/indexes in a derived data directory now instead of a "build" directory that is mixed in with your product files. It does this to deal with the new workspaces and also so that you can have clean builds of different projects in different workspaces without contaminating each other.
If your original template was old, your built product is probably relative to your source directory instead of relative to your built products directory, which is why it's showing up red. By default, your derived data directory will be under ~/Library/Developer/Xcode/DerivedData. To see where your current workspace/project is placing these files, you can File->Workspace Settings... and take a look at the Build Location.
I was having this problem. not only the product .app was red, also simulator wasn't loaded the binary, it was stuck in attaching 'my app'.
i solved it by going to file->project settings. in the tab 'build' changed derived data location to 'project-relative', and in advanced changed build location to 'locations specified by targets'.
with the default options it wasn't possible to run the app, i'm not sure why.
To resolve the issue in XCode 4.x go through following steps :-
Open your project in XCode.
Select .xcodeproj file in XCode project Navigator.
Select the target under the PROJECT Heading. (i.e. the top most target, this target specify your project level build settings)
Now navigate to Build Settings.
Now search for option "Per-Configuration Build Products Path" and update it's value to $(SYMROOT) .

Resources