# Failing to set LSApplicationCategoryType

**URL:** <https://discourse.cmake.org/t/failing-to-set-lsapplicationcategorytype/14168>\
**Category:** Code\
**Created:** [May 27, 2025, 10:26am UTC](https://discourse.cmake.org/t/failing-to-set-lsapplicationcategorytype/14168 "2025-05-27T10:26:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![perdrix](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/a8b319/32.png) [@perdrix](https://discourse.cmake.org/u/perdrix)\
**Post date:** [May 27, 2025, 10:26am UTC](https://discourse.cmake.org/t/failing-to-set-lsapplicationcategorytype/14168/1 "2025-05-27T10:26:45Z")

</div>

I added:

```auto
set(CMAKE_XCODE_ATTRIBUTE_INFOPLIST_KEY_LSApplicationCategoryType "public.app-category.astronomy" CACHE STRING "")

```

to my top level CMake file, but nothing ends up in the Info.plist file?

Am I doing this wrong?

Thanks  
David

---

<div class="post-metadata">

**Author:** ![Angew](https://discourse.cmake.org/user_avatar/discourse.cmake.org/angew/32/229_2.png) [@Angew](https://discourse.cmake.org/u/Angew)\
**Post date:** [May 27, 2025, 11:27am UTC](https://discourse.cmake.org/t/failing-to-set-lsapplicationcategorytype/14168/2 "2025-05-27T11:27:51Z")

</div>

I have no experience with this directly (or XCode itself, for that matter), but note that this variable is of the type which pre-initialises target properties when targets are created, and it’s target properties themselves which carry the semantics. IOW, you have set this variable before you create the target(s) to which you want it to apply. Double-check that this is the case.

To test, you can also set the target property [`XCODE_ATTRIBUTE_INFOPLIST_KEY_LSApplicationCategoryType`](https://cmake.org/cmake/help/latest/prop_tgt/XCODE_ATTRIBUTE_an-attribute.html#prop_tgt:XCODE_ATTRIBUTE_%3Can-attribute%3E) directly on a target and verify whether it does what you need.

Also, do you need/want it to be a cache variable (which is what you’re setting now). You could also try setting a plain variable instead and seeing if anything changes.
