How to set an OSX application dock icon in XCode? - macos

So far the only working solution I have found is to use:
[NSApp setApplicationIconImage: myImage];
But this message is sent after the default icon is already in the dock, so it's not working: the icon is initially set to the default application icon. I have not found the correct place to send this message.
I have read this: How can I set the icon for a Mac Application in Xcode? but it seems a bit too old to be useful for XCode 4.3
What is the standard way to set the dock icon, and even more importantly, where in the documentation is this described ?

I have trashed 4.3 two days ago, so I am using 4.5 developer preview to explain, but it should be similar.
Open up you project
In the left inspector be sure you are in the project navigator
Click the top node which should be named like your project
The middel section should now show some summaries of your project
Click on your Project name under "Targets"
The middle section should now show some Tabs, get on "Summary"
Drag your Icon file to the App Icon field.
Hope that helps.

Related

Why Is Xcode's Documentation Window Not Working?

When I option click an iOS symbol in Xcode's editor I get a popup summary. Near the bottom there is a link (such as "Class Reference") which should take me to the Documentation for that item. When I click it I am indeed taken to the Documentation Window but the contents of the window do not change - i.e. it continues to display whatever was being displayed before I clicked. In the past these documentation links worked properly. I am not certain if the errant behavior began when I upgraded to Xcode 9. Any help?

Xcode GPX icon Where is it located in Xcode 8.3

After upgrading to 8.3 Xcode I realize that the location icon is no longer there to add custom GPX location. Does anybody know where this icon was set to or is it completely remove.
The presence of this button is controlled by a setting in your scheme. Click on the Scheme popup in Xcode's toolbar, choose Edit Scheme from the menu, select the Run action, then click the Options tab, and verify that "Location Simulation" is checked.

Change Android Studio Icon in the Mac OS Dock

First up, I am not sure if this is the place to ask. Since there isn't a lot of Android-Studio tags on Super User and I know that a lot of people uses Android Studio on StackOverFlow. So please correct me if I'm wrong on the comment section to save me from the down votes.
So...
I tried changing the default icon of the Android Studio IDE on my Mac and I was able to do it. The problem is when I open it, it reverts to the original icon it has, then when I quit the IDE it returns to the icon I selected. Is it possible to make it always stay with the same icon I pasted in Finder Get Info?
Here is the icon I changed it to:
But it changes to this when it is opened:
In Mac OS X, there is an extra file for icons,
very commercial software always loads this file.
When you right-click the application "Android Studio",
and click on "Show Package Contents", then navigate to
Contents > Resources and replace "Android Studio.icns"
with an icon you created in a photo-editing or illustration
software (export to .icns or use a .icns icon converter).

How to add Toolbar Button to Title Bar

I have created a toolbar via IB and have a simple View menu with the "Show Toolbar" and "Customize Toolbar" menu items. Both work exactly as I would like them to.
But, I cannot seem to get the Toolbar Button to show up in the title bar of the NSWindow.
I have tried setting the "Shows Toolbar Button" in IB... no luck.
I have tried calling setShowsToolbarButton in the window controller's awakeFromNib
NSLog(#"showsToolbarButton: %#\n",[[self window]showsToolbarButton]?#"YES":#"NO");
[[self window]setShowsToolbarButton:YES];
NSLog(#"showsToolbarButton: %#\n",[[self window]showsToolbarButton]?#"YES":#"NO");
Again, no luck. Both log entries show "NO" and there is no button.
Has this feature gone away?
If not, what is the proper way to get that button to show up?
I'm building for OSX 10.6 and newer using Xcode 5.0.2 on a machine running 10.9.
Thanks for any/all insights.
The button to hide and show the toolbar was commonly seen as a small capsule button in the upper right corner at least through 10.6 Snow Leopard.
It is no longer present in standard OS X windows.
Ostensibly this is still in Xcode for supporting projects targeting older versions of OS X.
You can probably still create your own button and set its action to the same selectors, but you would likely need to create a custom window using NSBorderlessWindowMask to get the button in the title bar where it used to be.
In its place for the last several OS X versions you will find the full screen button instead.

Is there a way to undock the assistant editor in Xcode into its own window or onto a second monitor

Is it possible to have one assistant editor (on my second monitor for example) which always shows the counterpart to the file which I am currently editing (on my first monitor)?
I can create a new tab, drag it out into its own window and show the assistant editor but of course it doesn't show the counterpart to the file I am editing on my primary window/monitor.
Is there any way to make it do this?
No there isn't. But you can always send feedback to apple regarding what you'd like to see in future updates. If this request comes from many devs, maybe there is a chance to see it added to xcode.
Agreed. With the focus on multi-monitor support this is a feature that has been missing.
In Xcode 7.3, I just double click a file in the Project Navigator view and a new editor window with the file is opened.

Resources