# CMake generates a wrong bundle ID

**URL:** <https://forum.juce.com/t/cmake-generates-a-wrong-bundle-id/56812>\
**Category:** MacOSX and iOS\
**Created:** [June 27, 2023, 12:46pm UTC](https://forum.juce.com/t/cmake-generates-a-wrong-bundle-id/56812 "2023-06-27T12:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jellebakker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jellebakker/32/17053_2.png) [@jellebakker](https://forum.juce.com/u/jellebakker)\
**Post date:** [June 27, 2023, 12:46pm UTC](https://forum.juce.com/t/cmake-generates-a-wrong-bundle-id/56812/1 "2023-06-27T12:46:41Z")

</div>

Hi,

The logic for generating a default bundle ID by CMake is wrong. If the company or application name contains any spaces, then these spaces are not replaced with underscores. Instead, the bundle ID contains spaces, which is not allowed. The Projucer on the other hand deals with this properly.

According to the Apple [documentation](https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleidentifier): _“the bundle ID string must contain only alphanumeric characters (A–Z, a–z, and 0–9), hyphens (-), and periods (.).”_

Could this be fixed, please?

Thanks,  
Jelle

---

<div class="post-metadata">

**Author:** ![reuk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/reuk/32/21494_2.png) [@reuk](https://forum.juce.com/u/reuk)\
**Post date:** [June 27, 2023, 1:12pm UTC](https://forum.juce.com/t/cmake-generates-a-wrong-bundle-id/56812/2 "2023-06-27T13:12:15Z")

</div>

You can specify whatever bundle ID you require using the `BUNDLE_ID` argument to juce\_add\_plugin or juce\_add\_gui\_app.

---

<div class="post-metadata">

**Author:** ![jellebakker](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/jellebakker/32/17053_2.png) [@jellebakker](https://forum.juce.com/u/jellebakker)\
**Post date:** [June 27, 2023, 1:15pm UTC](https://forum.juce.com/t/cmake-generates-a-wrong-bundle-id/56812/3 "2023-06-27T13:15:55Z")

</div>

Thanks. That is indeed my current solution. But, as you probably understand, I prefer to minimize the amount of CMake customization and use default values as much as possible.
