Is there a way to rename an Xcode 4 scheme? - xcode

I've been looking all over Xcode for this, but I can't find any place that allows you to rename an existing scheme in Xcode 4. Is this even possible?

You need to click on the scheme button, then hit "Manage Schemes". Once you do so, you'll have a window like this:
Select the scheme you want to change, and hit Return.
Now the scheme name will be editable, and you can change it to your hearts desire. Then hit Return again to save it.

A slow double click also does the job.

Click once to select it. Then again click on selected title to get to edit mode.

Related

How do I change 'Selects Code Structure' from cmd + click to a keybinding?

I can't find any shortcut in the key-bindings list that will display this pop-up code actions menu. Is this strictly a click action only? Are there any potential workarounds for this?
I'm coming from vscode and I really loved being able to hit a keybinding and bring up all my code actions.
Thank you in advance!
I am not pretty sure what is your intend but i would rather use to this one for your case,
command click on code as jump to definition :)
what you do in Vscode Ctrl+Click is equal to cmd+click in Xcode

File chooser in a default Cocoa application

I have created a default [Swift] Cocoa application. I attempted to Ctrl drag from the default Open button in the menu to my View Controller in the assistant editor, but nothing happens.
Is my approach wrong? I assume there is some kind of default file chooser dialog, but I do not know how to make it appear or enable the Open menu item. From the documentation I feel I could make one appear programmatically, but I want to enable the menu button.
My first attempt at an OS X program hit a wall very fast :-/
First, control-Click on Open, and see if it is already attached to a function. If so, click the x to detach it, then try again.
Second, be very sure that the Assistant Editor is presenting the correct file to do the control-Drag. I have found that I need to manually choose the correct file much of the time.

How to set an external editor in Xcode 4.2

All the posts I have found suggest going to the "file types" sub-section under XCode preferences and adding an external editor for a specific file type. However this options does not seem to be there on XCode 4.2.
It looks like it just goes through LaunchServices, so... whatever you'd get by opening it using Finder by default.
I had a look around and I couldn't figure it out. I notice that right-clicking on a source file, there is a greyed out option for "open in external editor." I couldn't figure out how to get that working at a glance.
A reasonable workaround would be to right-click on the source file you want to edit, click "Reveal in Finder," and then edit the file in the editor of your choice. The changes will be automatically updated in Xcode. I think you'll lose any undo/redo history you may have had for that file in Xcode though.
you have to make the editor you want is the default editor for the file type(cpp/h/lua ..).
step: first time you 'show in finder', then open the file with 'open as', then choose the editor you want, make sure you choose the 'always open it'. then every is ok now.
I agree that you need to change the default setting for the file type in Finder. The best way to do that is to right-click any similar file in Finder. Select Get Info from the pop-up menu. Then look down the list for the "Open with" drop-down option. Select your chosen editor and then below the words "Use this option to open all documents like this one" click on "Change All..."
Then it will change the default for all your applications.

Delete a User Code Snippet in Xcode

How ??? I can not delete a custom code snippet in Xcode.
I did these steps :
Select needed code snippet and press Delete key.
A pop-up window will appear , and select Delete button.
Remember that : this action cannot be undone.
In the Library select the code snippet you want to delete and press Backspace. A confirm dialog will show up, click "Delete".
Good question, I haven't found a way to do it from within Xcode, but they can be deleted from the Finder. The snippets are stored at ~/Library/Developer/Xcode/UserData/CodeSnippets/. Each one is a separate file that you can delete. Unfortunately they're named with an ID and don't give an indication of which one is which. They're XML files though, so either use a text editor or QuickLook to see the contents and recognise them.
Also, I've had to restart Xcode in order to get the deleted snippets to no longer show up.
I was having trouble, and after messing around a bit it finally worked. You select the user snip and hit the delete key. I tried this multiple times but it didn't work initially. This may be due to me running a prerelease version of Xcode though.
In Xcode 10, select snippet from snippet pop-up dialog.
Then press Shift+⌘
After that just confirm your removal.
Note: This process cannot be undo at this moment.
I was trying forever to delete the useless (to me) C++ ones, but apparently you can only delete the user-created ones in Xcode 10. Bummer.
User-created code snippets are located in
~/Library/Developer/Xcode/UserData/CodeSnippets.
If your XCode UI for deletings snippets doesn't work as in my Xcode 10.2.1, you can navigate to this folder and
either delete all user snippets with rm * or use some kind of cat/grep to find the ones you want to delete.
In xcode select the code snippet
Delete title and shortcut and save it after that select the same and press delete a confirmation box pops up asking you to delete or cancel the code snippet.

Where did the "Search in Project" context menu item go in Xcode 4?

When you selected text in the code window and right-clicked on it, you would get a context menu with an option to "Search in Project" for the selected text. (Xcode 3.x)
Anyone knows how I can achieve the same in Xcode 4? Or a keyboard shortcut?
Now I select the text and wrestle my fingers in the following combination CMD-C, CMD-CTRL-F, CMD-V, RETURN. Feels a bit like playing the Playstation...
Cheers,
Niels R.
There doesn't seem to be a single keyboard shortcut, but one you might find useful is "Use Selection for Find" (Command+E). That is, you can select some text, and press Command+E, Command+Shift+F, Return.
It's no longer in a menu option but is accessible by an icon. Look directly beneath the "Schemes" at the sequence of 7 small icons. The 3rd one over is a "search" icon. Click that icon and type in your project search text and press return.
Just think it might be handy to see it at a glance:

Resources