How to Set Mac Icon for Exported App

I’ve got an app I’ve exported, and the icon is the generic processing blue arrow.

I have made a nice icon for it, and I can swap out the icon using Get Info and copy/pasting my icon onto the generic processing blue arrow icon.

But when I send the file to others, the blue arrow icon reappears and my custom icon does not show.

I’ve spent a loooong time googling this, and the closest I found was an open thread on processing website: https://github.com/processing/processing/issues/5225

However this has been open for years with no resolution.

So I’m wondering if there is a solution.

I’ve already created an application.icns file and placed it in the sketch folder - and also tried the data folder; it does nothing when I export the app.

I’ve also tried putting sketch.icns file in the sketch folder and the data folder.

Again, no joy.

This seems like such a simple thing and I have spent hours at this now.

Can anyone help? I want to set the main app icon that people see in the exported folder to be the custom icon, so even when I send the app out via email or users download it, the custom icon remains.

Thanks for your support.

Mike

Your custom .icns should be in the Resources folder of the packaged app; simply change the name of the default Processing.icns to something else and re-name your custom .icns to application.icns. The info.plist specifies that this is the app’s icon.

icns

1 Like

I did do that, long before posting this…but it doesn’t seem to work.

Screenshot 2024-07-24 at 8.48.12 AM

It’s frustrating to spend hours on stupid stuff…I really appreciate your help Svan.

Also, to be clear, I’m wanting to change the main exported icon that shows in the folder:

Screenshot 2024-07-24 at 8.50.50 AM

I can do it with right-clicking and Get Info, then copy/pasting the icon, but it only works on my system. I’m trying to get it to work wherever I send it too…

Thank you again Svan.

GetInfo should automatically have the correct icon; you shouldn’t have to change anything. The info.plist lists application.icns as the app’s icon and is what the operating system uses. However, I have noticed that when an Exported Processing app is opened, the dock icon is the default one not the custom one. Things could be different on an M2; I’m using Intel chip.

What did you do with the default .icns? I don’t see it in your screen shot.

There wasn’t a default.icns.

There wasn’t a default.icns.

Whoa. I’m sure Processing exported their little circle with an arrow in it; it’s white on my system (could be blue with a later edition).

You may already know this, but to be sure:

  1. An app is just a folder system with a custom icon (you could build it manually if you wanted to)
  2. Right click on your exported Processing app and select Show Package Contents.
  3. You should see a Contents folder (I use view as icons on the menubar). Open it.
  4. You should see Info.plist, PkgInfo and several folders: Java, MacOS, PlugIns, and Resources.
  5. Inside the Resources folder you should see the application.icns

*Note that I wrote default .icns not default.icns.

Hi Svan, everything you say is true.

Except I didn’t have a file named “default.icns.” It was named “application.icns.”

And I replaced it with the custom version I made (followed detailed steps here).

But no matter what I do, it does not change the main icon itself. Again, I can Get Info and paste an icon for the main app, but this does not stay when sending to another person.

I wrote default .icns not default.icns. I can’t understand why it doesn’t work on your system. I’ve written hundreds if not thousands of apps in my lifetime and whatever the info.plist says is law with the apple os.

Any way to put your custom.icns up on dropbox or someplace so I can download it?

Wow! That’s a total bummer.

I thought maybe I needed to log out/in, or restart the system, but no joy.

But yeah, it’s not named default.icns, it’s named application.icns.

I’ll send you a PM about the file.

Sent you a PM in the system here.,

I sent you a dropbox link to a Processing app that I exported some time ago. Please see if you can run it.

1 Like

Yes, I sent you a PM back - it won’t run.

Icon is customized tho.

I get this:

I sent you the app via WeTransfer, exported for Apple Silicone. I’ll be curious if you can open it or get the app icon to change…I couldn’t.

Thx for your time

Mike

That’s the error message I’m talking about. Now go under the apple menu SystemSettings/Privacy & Security and see if there’s not the option to open it anyway (down at the bottom). You could also try your right click open method.

No joy. Neither method works. Nothing in Privacy settings at the bottom after trying and failing to open it. Only the same error message when right clicking and selecting Open.

I received your app and have it loaded on a M2 mac. Icon is shown below(the icon you sent me is different; its blue). Is this the one that you want:
tc

So far I can’t open your app on M2 and do not see the two methods I described (just as you are reporting). Not sure how I’m going to open it; will keep trying.

1 Like

Watch this video and try the terminal option and I will do the same:
https://www.youtube.com/watch?v=WiYmUXVOlgI

Addendum:
I now have the ‘anywhere’ option and it’s checked under Security & Privacy but it still won’t let me open your app.

Hi Svan, yes the red MT icon is the one I’d like to use. But I can’t seem to replace the one that processing is using.

I even went so far as to rename it entirely differently, and then edit the Plist file to use the new named *.icns file, but it simply won’t change. Not sure what’s going on.

You can get the app to open if you change the permissions for the app file inside of the Package Contents/MacOS folder, using chmod +x 'Scene_Editor_V1_08'

Easiest way is to navigate to that folder, show the file path at the bottom, right-click the folder at the bottom and open a terminal there and use the above command.

THEN the app will open, but for me, to a blank screen. Well, there will be a “loading” window that will also never close.

Thanks for your help. I’m really not sure what to do.

I need to figure out why the app won’t work once it’s exported and sent to someone.

Again, app WORKS when exported and used on my machine, no errors. Although I still can’t get the blasted icon to change.