Projucer bug when changing app icons

While working on an app built with Projucer + Xcode, I had one app icon at first as a stand-in. Then later when graphics were finalized I tried to change the icon, and ran into trouble. The Icon (Small) and Icon (Large) menus in Projucer would show the list of available images to use as an icon, but it wouldn’t retain the settings I gave them, and the app would only build with the generic app icon.

I finally tried opening the Projucer file in a text editor, and found this part of the XML:

<EXPORTFORMATS>
    <XCODE_MAC targetFolder="Builds/MacOSX" smallIcon="RR4LvF" bigIcon="RR4LvF"
               useLegacyBuildSystem="1" hardenedRuntime="1" appSandbox="1" appSandboxOptions="com.apple.security.assets.music.read-write,com.apple.security.network.client">

I deleted the smallIcon and bigIcon attributes entirely, and tried re-opening the file in Projucer. Now, those menus would retain my selection, and the built app had the new icon.

Looking at the now updated XML Projucer file again shows those icon attributes have been rewritten, with new values.

Posting this here so others can find this as a workaround, and perhaps devs will find some issue with how Projucer is updating those properties.

EDIT:
If trying to reproduce this bug, one factor might be that I had removed the old icon image file from the project before adding the new image file and changing over the icon properties. Hence, that RR4LvF string (which is an id for a FILE element within the XML scheme) no longer had a FILE element that it was referring to…

Same issue here, JUCE 6.0.8.
When adding an icon file to the resources folder, and assigning the icon to an exporter, it keeps disappearing. This did not happen with JUCE 6.0.7 and previous versions…

It seems that when changing the icon in an existing project, the ID for the resource gets updated, but the ID for the exporters are not…?

I can also confirm that first removing all references manually in the Projucer file, and re-importing the icon and setting it as app icon resolves the issue…

Thanks for reporting. There’s a fix for this on develop now:

Thanks Ed!

As always - fixed in the blink of an eye - thanks @ed95 !