# How can I make the Xcode generator create a project with folders in alphabetical order?

**URL:** https://discourse.cmake.org/t/how-can-i-make-the-xcode-generator-create-a-project-with-folders-in-alphabetical-order/10633
**Category:** Usage
**Tags:** gen:xcode
**Created:** [April 11, 2024, 12:38pm UTC](https://discourse.cmake.org/t/how-can-i-make-the-xcode-generator-create-a-project-with-folders-in-alphabetical-order/10633 "2024-04-11T12:38:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![etjernlund](https://discourse.cmake.org/user_avatar/discourse.cmake.org/etjernlund/32/4431_2.png) [@etjernlund](https://discourse.cmake.org/u/etjernlund)
#### Post date: [April 11, 2024, 12:38pm UTC](https://discourse.cmake.org/t/how-can-i-make-the-xcode-generator-create-a-project-with-folders-in-alphabetical-order/10633/1 "2024-04-11T12:38:04Z")

</div>

Is there a way to make the Xcode generator to create a project with the folders in alphabetical order? We have a very large project and it seems the folders end up in the order they are found when the generation is done.

It is, of course, possible to manually right-click on the parent folder in Xcode and `Sort by name`, but it is both slow (large project, many targets and folders) and you have to do for every parent folder.

I know there is an issue about this ([issue #1631](https://github.com/microsoft/vscode-cmake-tools/issues/1631)), but that is now closed because the issue is regarded as fixed—which is it not for us.

This has been an issue for us for a long time, but at the moment I am using CMake 3.29.0 and Xcode 15.3.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [April 11, 2024, 5:43pm UTC](https://discourse.cmake.org/t/how-can-i-make-the-xcode-generator-create-a-project-with-folders-in-alphabetical-order/10633/2 "2024-04-11T17:43:20Z")

</div>

That issue is about VSCode, not Xcode. I don’t know what level of control CMake has over Xcode here, but you might be able to ask Apple as well through their channels.

@brad.king?

---

<div class="post-metadata">

### Author: ![brad.king](https://discourse.cmake.org/user_avatar/discourse.cmake.org/brad.king/32/11_2.png) [@brad.king](https://discourse.cmake.org/u/brad.king)
#### Post date: [April 11, 2024, 6:21pm UTC](https://discourse.cmake.org/t/how-can-i-make-the-xcode-generator-create-a-project-with-folders-in-alphabetical-order/10633/3 "2024-04-11T18:21:36Z")

</div>

This is [CMake Issue 21659](https://gitlab.kitware.com/cmake/cmake/-/issues/21659).
