In Xcode I use a task-based tabbed workflow (a separate tab for editing, UI/Modeling, building, debugging, etc.). I accomplish this using Behaviors (see the Custom section in the attached screen shot). When I create a new Project I use press ⌘+1, ⌘+2, etc. to quickly setup all of my task tabs.
My issue is that when I do this for a newly created Project all of the tabs display the source, storyboards, etc. from my most recently open Project. How often do you think this is useful or the desired behavior? I realize that one of the great things about tabs is that they remember their state and this is helpful. But as far as the source files that are initially displayed, this is a real pain. I do not want to see files from other (generally unrelated) projects.
Now what I just did as an experiment was open Project A and setup all of my tabs and ensured that each tab contained a source file from Project A. Then I quit Xcode and moved Project A a new location on the file system. When I opened Project B and created all of my tabs they were, as desired, empty.
I realize that I'm just going to receive the canonical "File a Radar" here but in the off chance that there is a workaround (NOT moving files) or a preference I could set, I figured I'd at least ask.
Thanks in advance,
CS
Related
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.
The Situation:
Suddednly, one of projects I work with, is seen in a very shorten way in the Project tool window :
.hgignore
.hgtags
External libraries
Those are all visible things in the Project tool window. On the main frame the file I worked with is shown. And all its path is seen in the navigation bar. From the navigation bar I can reach to all folders of the project. (It is a VERY large utility project, containing all static pages, images and things for many usual projects). Naturally, I would like to work normally, using Projects tool window. But there, as you can see, all folders are invisible.
Opening/closing of project tool window, IntelliJ restart or cach invalidate and restart won't help - the picture remains the same.
If I am adding a module to the project, it IS seen. If I am adding a folder to the project, it is NOT seen. All existing inner structure in the project is in folders, not modules.
The Possible Reasons of the broke:
All changes that I had made to the project by hand, is adding an image file. But from TortoiseHg I had made some updates. For other projects. That very project is not even in the Tortoise list of repositories. But as I had loaded the project from repository sometimes, it is known by hg. All other team members see the project normally.
Target:
I would like to see the project back in all its beauty.
In Eclipse you can create a folder and name it, say, "unused", to keep currently unused files (incomplete code, resources for future use, etc)
which are ignored by project builder. Can I have something similar with Xcode?
If I move a file to a project folder without inserting it with Xcode, it may be OK, and I will be able to see it while opening in Finder. However, it will be more convenient to have it listed by Project Navigator.
As far as I am concerned, it's not possible. Though, you can comment all of your code in one click to momentarily disable it.
Press command + A;
Right click and select Comment Selection.
I'm wondering how/if I can remove certain projects from the navigator menu in Eclipse? I'm in uni and I have multiple projects with similar names because of how I have to name files for labs, and it gets cluttered having so many projects showing. I was wondering if there was a way to remove them from the navigator without actually deleting them, that way I could hide the ones from last semester.
The Navigator view is old one. You can hide some predefined resources from it but not projects.
Better use Project explorer/Package explorer view.
First close the projects you want to hide in Project explorer/Package explorer view then refer this blog to hide them
Note that closing the projects also makes eclipse to work faster.
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.