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
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.
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…