How to use General and Downloads icon seen in Xcode's Preferences Panel?
Asked Answered
T

2

10

I have been creating a preferences panel that would pop up when an user taps +, in my Cocoa app, and I like to use the same General and Downloads icons that are used in Xcode.

enter image description here

However, as far as I know, when I moved Image Toolbar Item from Object Library to the Toolbar in IB and then search for the appropriate Image Name on Attribute Inspector, I cannot find these icons on the list. At first I wonder whether this is available only to Apple's software, but later I found that this same General and Downloads icons are used in 3rd party app, such as Dash:

enter image description here

Also, the NSPreferencesGeneral in the Image Name is NOT the same General icon as seen in the toolbar above. So how can I can use the correct toolbar icon in my app (which is built in Yosemite)?

UPDATE

Strangely, even within Apple's software, there are two types of General icon used. The toolbar below is from Calendar.app, but this is also used in other softwares such as Safari and Terminal:

enter image description here

This General icon looks like not fully compatible with Retina display. Even worse, the Xcode 6.2 uses the cool icon as seen in the first image, while Xcode 6.3 beta uses the awkward icon that is seen in Calendar.app.

Also, the NSImage Class Reference displays the same cool icon as seen in Xcode (6.2) and Dash.

enter image description here

So what is happening here...? Note that I use all of the apps I mentioned in this post on the same operating system on the same Mac. Anyone knows why this occurs?

Twostep answered 2/2, 2015 at 13:38 Comment(0)
S
2

The Downloads icon is custom and part of Xcode's resources. You don't own this artwork and don't have the right to redistribute it. I suspect Dash's developer also does not have Apple's permission to redistribute that icon.

As to the General icon, the system-provided one (as all system-provided icons) are available for developers' use when accessed via the NSImage API. The one you see in Calendar.app is, like the Downloads icon, is a resource inside Calendar.app. I'm not entirely sure whether this is a public domain image somewhere but it's likely it's Apple's property.

Either way, it's in your best legal interests not to redistribute artwork in your own app without permission (again, standard icons accessed through the API aren't "redistributed", so you're safe to use them - that's what they're there for). Your choices are a) use public domain artwork, b) make your own artwork, c) obtain written legal permission to redistribute someone else's artwork, d) buy ready-made artwork, or e) pay a graphic artist to produce custom artwork for you.

Shondrashone answered 30/4, 2015 at 21:29 Comment(5)
Any evidence that this is a custom resource in Xcode? I don't get then why the icon is shown in the NSImage Class Reference, which implies that the icon should be available via API...Twostep
To which icon (of the several you mentioned) are you referring? I don't see the Downloads icon in the class reference, which would mean it had to be packaged with Xcode. That's my evidence. As to the General icon (is there an echo in here?) you pointed out in Calendar app, it's not the same one as found in the API reference, therefore it also had to be packaged with Calendar. Please go back and read my answer again more carefully.Shondrashone
If the General icon that is used in Calendar app is the one that is packed in Calendar app itself, why do we get the same icon via the API? That is my question. Whenever you use the Cocoa API, you get the same icon that is used in Calendar app, but the official API documentation says otherwise.Twostep
Then it would seem the documentation hasn't been updated. File a bug report using the link at the bottom of the API reference. The answer to the subject line of your question remains the same, though: if the API doesn't provide it, the only way to use it is to obtain permission and distribute it as part of your app bundle's resources.Shondrashone
I personally redistribute, in my MacAppStore app, a pref pane with the General and Network icons. I don't know if I have the right to do so, but Apple never complained, since 4 years...Mankind
M
0

I would use the images as provided by the "Constants" section of the NSImage documentation, and not worry about which version it is exactly, as you have no control on it (and none are provided by Apple anyway).

Mankind answered 5/5, 2015 at 8:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.