# How to set host application for XCTest?

**URL:** https://discourse.cmake.org/t/how-to-set-host-application-for-xctest/3401
**Category:** Usage
**Tags:** gen:xcode
**Created:** [May 25, 2021, 12:08pm UTC](https://discourse.cmake.org/t/how-to-set-host-application-for-xctest/3401 "2021-05-25T12:08:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![zhang\_kai](https://discourse.cmake.org/user_avatar/discourse.cmake.org/zhang_kai/32/929_2.png) [@zhang\_kai](https://discourse.cmake.org/u/zhang_kai)
#### Post date: [May 25, 2021, 12:08pm UTC](https://discourse.cmake.org/t/how-to-set-host-application-for-xctest/3401/1 "2021-05-25T12:08:46Z")

</div>

Hi, when I use `xctest_add_bundle` to add a XCTest in XCode, the host application is not set. But the host application is needed to run the tests.

Since we want to cmake, build and run test in CI/CD pipeline, we can’t open XCode to set the host application. Is there anyway to set the host application in cmake?

---

<div class="post-metadata">

### Author: ![Princekin](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/p/a8b319/32.png) [@Princekin](https://discourse.cmake.org/u/Princekin)
#### Post date: [July 25, 2022, 8:24am UTC](https://discourse.cmake.org/t/how-to-set-host-application-for-xctest/3401/2 "2022-07-25T08:24:31Z")

</div>

I had the same question! anyone help will pleasure
