I played around with using icons for a custom data file I’m using. I read on the documentation about UTI and these things, but used MacCreator code, which at least should work even it is deprecated by Apple.
And it works - partially. My custom icons are used when displaying small sizes (around 32*32 pixels) - but as soon as I enlarge the icons on finder, the default icon is being used.
I checked the software package and found all my icons being within the package in the icons file. It just seems that Xojo doesn’t take over the larger icons.
Where can I look to fix this ? I’m using png-images for icons (created from SVG with Inkscape).
Mac Creator codes may NOT in fact work without a UTI
Xojo doesn’t “take over” any - its up to the finder
It decides if what you have set up is something it can use and if not you get the generic ones
Your plist and ICNS file are whats relevant
So you have the higher resolutions specified, it’s odd that they show for smaller resolutions, but not larger. Which version of Xojo are you using?
What xojo code do you use to create your file(s) ?
(TextOutputStream or BinaryStream ?)
Sorry for my late reply… daytime job.
@Norman Palardy : But in this case, I expected that no icon would work overall. But the 16x16 and 32x32 are fine. As soon as I’m zooming the icons larger (in finder, for example), default ones are used.
@Emile Schwarz : Latest 2015 R1. Files are SQLite database files (no textoutputstream or binarystream used).
@Norman Palardy : Do I have to set up UTIs each time after I compiled by hand ?? Wow… not expected this. Especially because it seems to be a quite complex task (just found the matching chapter in documentation).
Is there a way to speed this up, for example by executing some scripts at compile time ?
I also noticed that icons are not working on Windows - so at least here it can’t be a UTI issue.
I’m using 1024x1024 sized PNGs (created from SVG with Inkscape), and just dragged and dropped the PNG into the appropriate spaces of the icon window on Xojo. I assume that the 1024x1024 is automatically converted (at least this works with the app icon well).
Oh, I read through the documentation and found that on filetypes for the “extension” property it is advised to not use a dot character when specifying the extension. But doing so, breaks anything, so I think this is a mistake in the documentation.
You can use App Wrapper to add in the UTIs for you ever time run run or build from Xojo.
There is a far easier way:
- Write your UTI data to a file called “info.plist”.
- Drag the file to the Xojo project.
- No more steps to do. Xojo adds the text from the plist file to the applications plist.
Here is an example for an UTI that I use:
[code]<?xml version="1.0" encoding="UTF-8"?>
@Beatrix Willius : Thank you. I I’ll take it over.