Remove recent items in the Xcode's CheckOut window - xcode

is there a way to clean recent items in the checkout dialog box ("source control" -> "check out...") on Xcode 7 ?

It seems that you will need to find com.apple.dt.XCode.plist located in your Library/Preferences directory.
Search for IDESourceControlRecentsFavoritesRepositoriesUserDefaultsKey and there should be a list of items under that key. Unwanted repositories can be deleted from it and it will be reflected the next time XCode is restarted.
Such a difficult task for something to trivial. But hey, at least it is possible to do this. Cheers.

That window lists both:
Projects/Workspaces that Xcode is tracking (and thus maintaining derived data for, like build products)
Repositories that Xcode is holding login credentials for
For the first one, look in the Projects window. You can clear things out of there, at the cost of losing the derived data associated with them.
For the second, look in the Accounts pane of Xcode Preferences.
Once you've deleted things from both places, they shouldn't show up in the Check Out window anymore. (If they do, I'd call that a bug... and file it with Apple.)

Related

Is it Possible to Add Multiple Frameworks to Xcode Project at Once?

I feel like there should be an easy way to do this but can't find it. Whenever I use the Parse.com framework for an iOS project, I have to add at least 10 different frameworks, and as far as I can tell I can only add 1 at a time through the Linked Frameworks and Libraries options in Xcode.
Any faster way to do this, besides creating a template project?
More specifically, the issue is that if I pick a framework, then search for another and hold CMD to select multiple, searching erases all previously selected frameworks (so I have to just scroll through the list).
Searching (as you discovered) kills the current selection. You can cmd-click to select multiple, but only if you don't use search. It's annoying as hell.
Similar to the "add file to project" dialog that forces you to click the checkbox for every single target manually (no "select all targets").
One of those annoying parts of Xcode that apple hasn't prioritized as having enough user impact to fix (since most people add one framework, or just have one or two targets for the other example).

Xcode: Tabbed workflow

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

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.

How do you create a Subversion tag in Xcode 4?

I can't figure out how to create a Subversion tag in Xcode 4. I would think it would be in the Organizer -> Repositories interface, but I can't seem to find a way. In Xcode 3, you could browse the SVN repository, click the "Copy" button in the window's top bar, and then specify the tags/ SVN directory. I don't see the same type of option in Xcode 4. Help?
My workaround for now is the command line:
svn copy trunkSourceUrl tagsDestinationUrl -m "My tag message."
Alas, as with the ability to merge branches, it would appear tags can't be managed in XCode 4 yet. This is a bit ridiculous considering that, programmatically, creating a tag is exactly the same operation as creating a branch. Guess we're stuck with terminal commands until Apple finally gets their act together about SVN.
Funny that it did work in XCode 3.
You need to go to the top level for your repository, and select it in the right pain of the Organizer. You will see where you put your username and password. Under that you will see fields to specify Trunk, Branches, and Tags. I just put trunk, branches, and tags (as that is customary for svn layouts). The jewels beside should change to green, and you will see folders for Trunk, Branches, and Tags popup under the repos on the right.
You correctly stated that it did work in XCode 3, and no longer works in XCode 4.
I guess you more or less answered your own question - you can still use XCode 3 for SVN copying, tagging and such. I just tried this, and it seems to work OK with XCode 4 open at the same time. You don't need to open any file or project in XCode 3 to be able to use the 'SCM' menu. Since you won't need to do this often (I guess), it's not a major issue to use two XCode applications at the same time for a short while; otherwise, this could get confusing.
Select the "Root->Tags" directory, create a new directory with the name of the release you want to tag e.g "MyGreat App 1.1"
Select the new directory and click "Import", then select your source code directory and click the "Import" button.

How can I clear all entries in the Log Navigator in Xcode4?

Over time there are many past log entries (for either build or debug sessions) accumulated in the Log Navigator. How can I remove these entries?
Turns out this is what you have to do:
Go to Organiser
Go to Project tab
Select your project
Select the Delete button on the right hand side where it says "Derived Data includes Index, build output and logs"
Close the project or workspace.
Re-open the project or workspace.
Note that the comments are correct. This approach does delete the index, and build output in addition to the logs. It does warn that "The first indexing and rebuild of a project after that may be slower".
I know this is a bit old, but I think the accepted answer is an awkward way to do it (though it will certainly work!). It's easier to do this in Finder.
By default, Xcode stores its data inside its DerivedData folder.
Quit Xcode.
In the Finder choose Go -> Go to Folder…. Paste ~/Library/Developer/Xcode/ into that. (Or otherwise navigate there.)
Every Xcode build artifact (including logs, compiler object files and finished/linked executables) that hasn't been archived is inside DerivedData. So go ahead and drag DerivedData into the Trash.
You can, of course, delete individual folders instead. But since these folders rebuild are derived data and will be rebuilt completely when you rebuild your projects, there's very little reason not to delete all of DerivedData.
If you do a lot of work in the command line, you can do this there, too:
$ rm -fR ~/Library/Developer/Xcode/DerivedData
I do this several times per day sometimes, if I'm switching rapidly between branches and worried Xcode could get confused. And doing it after an Xcode update saves you from any worry that Xcode might not rebuild everything, requiring you to clean projects.
I should note that this only applies to DerivedData. Some of the other folders in ~/Library/Developer/Xcode are quite important:
Archives stores the result of every Product->Archive you've done. While you might want to delete some of these, you're rarely going to want to delete them all.
UserData stores your code snippets, fonts and colors, keybindings, and source control author names.
If you want to know what the rest are, have a look through them. But don't delete them blindly, like you can with DerivedData. :)
This works in Xcode 5 and may work in Xcode 4:
If you just want to clear the million entries in the Log Navigator, try closing the project/workspace and reopening it. (Close, Open Recent)
This cleared the Log Navigator for me, was less effort than doing anything in the Organizer window, and did not delete the index or build output.

Resources