What should CFBuldneURLIconFile size be? - xcode

What should the size of the icon supplied for CFBuldneURLIconFile be?
I'm guessing 57x57 and that having an #2x version present will automatically be loaded where appropriate, but can't find documentation anywhere (Googling 'CFBuldneURLIconFile' returns nothing!)

Do you mean CFBundleIconFile? (Must confess I've never heard of "CFBuldneURLIconFile" - where does this come from?)
Irrespective, there's an Apple Q&A document entitled "How are the icon files in my application bundle used on iPad and iPhone?" that lists all of the relevant icon sizes/default filenames, which should tell you what you need to know.
Irrespective, the default sizes/names are 57x57 ("Icon.png") for the non retina/iPad devices, 114x114 ("Icon#2x.png") for retina devices and 72x72 ("Icon-72.png") for the iPad, if that's relevant.
UPDATE
Think I might have found what you're after. The Information Property List Key Reference doc contains information about the CFBundleURLTypes, which states that it's effectively the URL equivalent of the CFBundleDocumentTypes. As such, you can presumably use the icon sizes it lists within that part of the documentation. (See the "Document Icons" section.)

Related

What do symbols in Xcode threads/queue view mean?

Every day during iOS development we are using Xcode' threads/queue view of the debug navigator to examine stack frames, switch between them and po, etc. vars and expressions. But I don't really understand all the icons (legend) in this window. I only know that blue-tinted icons show live stack frames and grey ones show recorded (historical) frames. But what each specific icon represents. I attached screenshots with different icons:
And another one:
As you can see each frame has it's own icon. I guess user image means user code(or not??), also there is an icon of a gear wheel, a mug(cup), a brick wall icon and a suitcase icon on the second screenshot.
Can someone point me to the doc where all these icons and their meanings are explained or if no such doc exists then explain what do they mean.
You can find answer in apple docs: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/debugging_tools.html#//apple_ref/doc/uid/TP40015022-CH8-SW19
It's icons for different process. You can see more here https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/debugging_tools.html#//apple_ref/doc/uid/TP40015022-CH8-SW19

The Sidebar Icon image name in OSX

Is this icon included as part of the Cocoa API? What is the icon name?
I read the HIG but could not find a reference - https://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/OSXHIGuidelines/SystemProvided.html#//apple_ref/doc/uid/20000957-CH92-SW1
It's undocumented. The image's name is NSImageNameSidebarTemplate. (NSSidebarTemplate in IB, though it's only visible at runtime).
I don't know though if this is off-limits and whether it will get you rejected.
Can't see anything that would match in the constants specified in
NSImage - i.e. it's not any of the images listed in Image Template Constants, View Type Template Images, etc. -
so I doubt it's generally available to apps..

Is "XM_CXSMICON" a misspelling of "SM_CXSMICON" in these MSDN pages?

In the three MSDN articles linked at the bottom of this post, the pre-processor macro XM_CXSMICON is mentioned. In context, it is supposed to be the index of the system metric that gives the width of a small icon in the notification tray or on the balloon-popup of such an icon.
Here is a quote, verbatim:
NIIF_LARGE_ICON (0x00000010)
0x00000010. Windows Vista and later. The large version of the icon should be used as the icon in the notification balloon. This corresponds to the icon with dimensions SM_CXICON x SM_CYICON. If this flag is not set, the icon with dimensions XM_CXSMICON x SM_CYSMICON is used.
The other three macros from that quote, SM_CXICON, SM_CYICON and SM_CYSMICON, are all defined in user32.h as expected but no header file in the Windows API defines XM_CXSMICON. Searching the MSDN only returns the hits linked at the end of this post, all of which are related to notify-icons.
With this evidence, I conclude that this is an error and the macro is actually SM_CXSMICON which is defined on the line above SM_CYSMICON in user32.h.
Can anyone confirm this guess or provide further information?
The three MSDN articles in question:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb773352(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/bb774428(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/ee453691(v=vs.85).aspx
Yes, that is a typo. It should read SM_CXSMICON x SM_CYSMICON.

Dynamically change paper size based on printer being displayed on NSPrintPanel

We are trying to modify the default selected paper size for a NSPrintPanel. Using NSNotification we are able to observe and implement changes on our accessoryViews in the NSPrintPanel. However when we try to implement setPaperSize (NSPrintInfo the instance method), nothing happens and the initial paper size (default) for the default printer is selected for all other printers (We have regular printers and receipt printers).
I know the new paper size being set is correct whenever the printer changes. We are programmatically obtaining the paper sizes from the Core Print. While trying to the set the right/desired paperSize, the app doesn't break or returns any stack. So it seems, it seems apple doesn't support changes to the paper size PrintPanel.
While researching the issue, we noticed that NSPrintPanel accessory view from apple titled "Paper Handling" seems to respond to the printer changes, based on the settings you provide to Page Setup (in the file menu, NSPageLayout). So our questions are:
Is there a way to access/set the Suggested Paper size displayed in this accessoryView programmatically?
I know this accessoryView reads from page setup (NSPageLayout), thus I'd like to know if to access set these values in the "Paper Handling" accessoryView is a good approach?
Notes:
- Mac doesn't seem to allow/provide a user friendly way to set default paper sizes for each printer installed.
Accessory View we are talking about:
We have reviewed apple documentation (of course) and posting from other people with similar issues with no avail. We'd greatly appreciate a push in the right direction. Thanks in advance.
It’s been a while since I’ve done this, but what happens when you set it on the NSPrintPanel’s printInfo? Any better? It might make its own temporary copy.

NSApplication orderFrontStandardAboutPanel: Making my about panel slightly less standard

What are my options, if any, of adding additional, arbitrary data to the standard Cocoa about dialog that is displayed by an NSApplication when it receives a orderFrontStandardAboutPanel message.
If you add a file named Credits.rtf to Resources the contents will automatically be used in the expanded standard about panel and you can put whatever info you want in the file. It will still pull the standard copyright, version info, etc from the info.plist. It is the easiest way I know of to add arbitrary info, otherwise you pretty much will have to roll your own about panel.
-[NSApplication orderFrontStandardAboutPanelWithOptions:]
Expanding further on the answers from Darrell Root and theMikeSwan above, Apple's documentation for the credits property of NSApplication.AboutPanelOptionKey states:-
The value of this key is an NSAttributedString displayed in the info
area of the panel. If not specified, AppKit then looks for a file
named “Credits.html”, “Credits.rtf”, and “Credits.rtfd”, in that
order, in the bundle returned by the Bundle class method main. The
first file found is used. If none is found, the info area is left
blank.
Expanding on theMikeSwan's answer, by accident I found that if you add a file named Credits.html to the Resources folder, it's contents get used in the expanded standard about panel. In fact Credits.html appears to override a Credits.rtf.
So your choice whether to use html or rtf format, or wire up "About" to a completely different custom window controller.

Resources