# Juce\_add\_bundle\_resources\_directory()

**URL:** <https://forum.juce.com/t/juce-add-bundle-resources-directory/55442>\
**Category:** General JUCE discussion\
**Created:** [March 20, 2023, 3:10pm UTC](https://forum.juce.com/t/juce-add-bundle-resources-directory/55442 "2023-03-20T15:10:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pizzafilms](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pizzafilms/32/562_2.png) [@pizzafilms](https://forum.juce.com/u/pizzafilms)\
**Post date:** [March 20, 2023, 3:10pm UTC](https://forum.juce.com/t/juce-add-bundle-resources-directory/55442/1 "2023-03-20T15:10:40Z")

</div>

I have a couple of lines in my CMakeLists that copies preset files into the bundle like this:

```auto
if(IOS)
    juce_add_bundle_resources_directory(MyApp_Standalone ../PresetsIOS)
    juce_add_bundle_resources_directory(MyApp_AUv3 ../PresetsIOS)
endif()

```

At one point, I rearranged the folders and file structure in the presets folder and then noticed that when I ran my app, all the presets were duplicated. It looked like a combination of the original file structure and the new file structure. The only way to correct this was to do a Clean Build folder in Xcode.

It seems that `juce_add_bundle_resources_directory()` doesn’t do a replace, but just some sort of simple file copy. If that’s the case, what’s the right way for this to get cleaned out at the start of a build?

---

<div class="post-metadata">

**Author:** ![benvining](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/benvining/32/9922_2.png) [@benvining](https://forum.juce.com/u/benvining)\
**Post date:** [March 20, 2023, 4:34pm UTC](https://forum.juce.com/t/juce-add-bundle-resources-directory/55442/2 "2023-03-20T16:34:06Z")

</div>

I would expect to have to run a clean after changing that. The `juce_add_bundle_resources_directory` function basically just sets a property on those files, which CMake then uses to place them in the final bundle.
