# Projucer bug when changing app icons

**URL:** <https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923>\
**Category:** General JUCE discussion\
**Created:** [July 13, 2021, 9:12pm UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923 "2021-07-13T21:12:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![refusesoftware](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/refusesoftware/32/20561_2.png) [@refusesoftware](https://forum.juce.com/u/refusesoftware)\
**Post date:** [July 13, 2021, 9:12pm UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923/1 "2021-07-13T21:12:11Z")

</div>

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:

```auto
<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…

---

<div class="post-metadata">

**Author:** ![djb-2](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@djb-2](https://forum.juce.com/u/djb-2)\
**Post date:** [July 14, 2021, 4:08am UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923/2 "2021-07-14T04:08:06Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ed95](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ed95/32/7635_2.png) [@ed95](https://forum.juce.com/u/ed95)\
**Post date:** [July 15, 2021, 1:10pm UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923/3 "2021-07-15T13:10:57Z")

</div>

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

> <https://github.com/juce-framework/JUCE/commit/0b79bcec690d658c1a6d273ae7c26113dc98e459>

---

<div class="post-metadata">

**Author:** ![refusesoftware](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/refusesoftware/32/20561_2.png) [@refusesoftware](https://forum.juce.com/u/refusesoftware)\
**Post date:** [July 15, 2021, 5:08pm UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923/4 "2021-07-15T17:08:46Z")

</div>

Thanks Ed!

---

<div class="post-metadata">

**Author:** ![breebaar](https://avatars.discourse-cdn.com/v4/letter/b/da6949/32.png) [@breebaar](https://forum.juce.com/u/breebaar)\
**Post date:** [July 16, 2021, 3:46am UTC](https://forum.juce.com/t/projucer-bug-when-changing-app-icons/46923/5 "2021-07-16T03:46:10Z")

</div>

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