Vanishing ICON

While we are on the subject of “Vanishing”

In my App I have defined application icons (OSX) for 512, 256, 128, 48(32bit), 32(32bit)
all have DEFAULT masks (ie. I did not create a mask as they are full square icons)

HOWEVER, when I compile and/or run the program via the IDE… I still get the “default” icon
once in a blue moon the correct icons show up…

Personally, I don’t rely on the Icon facility for the Mac side. I have a build script that replaces the icns file, especially since I want it to be Retina-compatible.

[quote=93208:@Dave S]While we are on the subject of “Vanishing”

In my App I have defined application icons (OSX) for 512, 256, 128, 48(32bit), 32(32bit)
all have DEFAULT masks (ie. I did not create a mask as they are full square icons)

HOWEVER, when I compile and/or run the program via the IDE… I still get the “default” icon
once in a blue moon the correct icons show up…[/quote]

For some reason the debug program does not show the custom icon. I see the same for my apps.

on a slight different but similar issue, on one of my apps, all my builds excluding MAC builds with the right icon. MAC uses the “document” icon as the app icon. I might have to use the method Kem uses to fix my issue.

Never had this issue until this project… :frowning:

I only have the issue with the one project also.

It’s probably one of those silly issues that get fixed when you clear the cache or restart because I’ve never had an issue with the icon either.

I have cleared the cache, I have tried different versions of Xojo and have rebooted multiple times. all with no luck.

What’s your UTI look like in the info.plist?
Did you ever launch with the UTI pointing to a filename which would now be incorrect?

I was researching a little and came across this:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump

See if yours points to the correct .icns file. (use in terminal)

research is still in progress

EDIT: I seem to be posting information about the reverse of your problem, oops :stuck_out_tongue: Still useful things to know. Does the info.plist for the app icon show the correct filename, or is it the name of your document icon?

The plist looks like what ever Xojo wrote… so I don’t know what to tell you

Sorry, those questions were trying to troubleshoot Scott’s problem, however it can help with your situation.

When you build/run, go track down the info.plist in the temporary build and see what it says. This will help us know if it’s a Xojo issue or a Mac OS X issue. What’s the value for <key>CFBundleIconFile</key>?

which exists in the RESOURCES folder of the App Bundle (icomp.debug.app)
and contains the correct icons…

But then… it does seem to be working the run… it works sometimes, and not others

When it fails, look to see if the icomp.debug.icns file is a blank application icon or the one you’re expecting.

Are you running Mavericks? Could it be because you don’t have the 1024 x 1024 element and I’m not sure what Xojo is using for storing the ICNS data… I haven’t looked at a Xojo ICNS file for a long time…

Try using a tool to create your ICNS file, I would recommend one of mine, but there are many others, and using a build script to import it (or one of my previously mentioned tools).

BTW, the elements used in ICNS file are one of Apple’s ever evolving things; with minimal documentation. You can use their command line tools (I forget the name) to convert a folder of PNG files into a 10.8 compatible ICNS file.

Yes Mavericks…

I have other projects, where just putting a single 128x128 icon works just fine (not going to Apple Store)
This project… sometimes it works, sometimes it doesn’t

I have what I think is the same app icon issue. I have an app I have been developing using an icon I dragged to the app’s Edit Icon window. Now I want to change the icon so I dragged a new icon to the app’s Edit Icon window. I save the project. I even quit Xojo and restarted. Still it shows the old icon when I run debug or build the app. I think this is entered in Feeback case “25878 - Old ICON in icns-file” which is over a year old and has been reviewed. The only workaround seems to be Kem’s suggestion of a build script.

Opps. After previous post I remembered that I did have a build script which was inserting the app icon. Just fixed the script and it works. Wish I knew how to remove embarrassing posts.