# Build wrapper is not working as expected, Objective C, XCode

**URL:** <https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357>\
**Category:** SonarQube Server / Community Build\
**Tags:** build-wrapper, cfamily, sonarqube\
**Created:** [December 24, 2022, 12:06am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357 "2022-12-24T00:06:14Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stalin\_Vladimir\_Gome](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/stalin_vladimir_gome/32/30633_2.png) [@Stalin\_Vladimir\_Gome](https://community.sonarsource.com/u/Stalin_Vladimir_Gome)\
**Post date:** [December 24, 2022, 12:06am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/1 "2022-12-24T00:06:14Z")

</div>

Hi guys,  
Please I need your help to figure out why the build wrapper tool is not working as expected when running the command to build an Ios - Objective C on a Mac (Intel x86 Architecture).

The build command alone is working fine.  
xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo  
\*\*\* BUILD SUCCESSFUL\*\*\*

But when running with the build wrapper command:

build-wrapper-macos-x86 --out-dir bw-output xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo

Two files are created inside bw-output folder but the dump json file does not seem complete, also the command execution was too fast and that is unusual. I Attached the build wrapper logs and dump file  
[build-wrapper-dump.json](https://community.sonarsource.com/uploads/short-url/As23CrVW9lIUwGxdzKUdzjJz3As.json) (507 Bytes)  
[build-wrapper.log](https://community.sonarsource.com/uploads/short-url/1VKgEWWOJjwUL47VoWBuOZokKRf.log) (3.8 KB)

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [December 27, 2022, 2:34pm UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/2 "2022-12-27T14:34:31Z")

</div>

Hey there.

Based on the logs, your `xcodebuild` command is returning a non-zero exit code.

`Tue Dec 20 15:34:49 2022: returned with code: 1`

Is the build behaving as expected (and succeeding) without the build wrapper in play?

---

<div class="post-metadata">

**Author:** ![Stalin\_Vladimir\_Gome](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/stalin_vladimir_gome/32/30633_2.png) [@Stalin\_Vladimir\_Gome](https://community.sonarsource.com/u/Stalin_Vladimir_Gome)\
**Post date:** [December 27, 2022, 3:06pm UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/3 "2022-12-27T15:06:23Z")

</div>

Hi Colin,

Yes, the build command alone is working as expected.

---

<div class="post-metadata">

**Author:** ![Stalin\_Vladimir\_Gome](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/stalin_vladimir_gome/32/30633_2.png) [@Stalin\_Vladimir\_Gome](https://community.sonarsource.com/u/Stalin_Vladimir_Gome)\
**Post date:** [December 29, 2022, 11:02pm UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/5 "2022-12-29T23:02:33Z")

</div>

![compilasonarqube](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/e/d/ed7aafcd74e7f9d951ab93c6b2d8aadac75eb5ed.png)

Initially, I had used this command:  
xcodebuild clean build -workspace PagaloTodo.xcworkspace -Scheme PagaloTodo  
and the build is successful.

I had tried passing others configuration options as arch, sdk, BUILD\_LIBRARIES\_FOR\_DISTRIBUTION where  
also the build is successful but the build wrapper generated file is uncomplete.

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [January 2, 2023, 1:49pm UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/7 "2023-01-02T13:49:57Z")

</div>

Hi @Stalin_Vladimir_Gome ,

looking at your `build-wrapper.log` it seems that you are on macOS Ventura 13.1. Unfortunately, build-wrapper currently doesn’t support macOS 13, see the related ticket: [[CPP-3987] - Jira](https://sonarsource.atlassian.net/browse/CPP-3987).

You can use the JSON Compilation Database instead. To generate a Compilation Database:

- if you are using CMake, set the CMAKE\_EXPORT\_COMPILE\_COMMANDS option
- if you are using Xcode, use xcpretty

---

<div class="post-metadata">

**Author:** ![hudson](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@hudson](https://community.sonarsource.com/u/hudson)\
**Post date:** [August 16, 2023, 2:34am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/9 "2023-08-16T02:34:36Z")

</div>

It have been half year, is there any update on the wrapper?

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [August 16, 2023, 7:53am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/10 "2023-08-16T07:53:05Z")

</div>

Hi @hudson ,

we recently added support for macOS Ventura: [[CPP-3987] - Jira](https://sonarsource.atlassian.net/browse/CPP-3987). It is going to be released in the next SonarQube version 10.2 and will be available soon on SonarCloud.

---

<div class="post-metadata">

**Author:** ![hudson](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@hudson](https://community.sonarsource.com/u/hudson)\
**Post date:** [August 16, 2023, 8:17am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/11 "2023-08-16T08:17:37Z")

</div>

Is that possible to use the latest wrapper in Sonarqube LTS (9.9.1)?

---

<div class="post-metadata">

**Author:** ![mpaladin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/mpaladin/32/118_2.png) [@mpaladin](https://community.sonarsource.com/u/mpaladin)\
**Post date:** [August 25, 2023, 7:56am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/12 "2023-08-25T07:56:54Z")

</div>

Hi @hudson ,

no, it is not possible and it is unlikely that we are going to backport this feature to the LTS version.

However, you could test if the new feature works fine for you, the new build-wrapper is already on sonarcloud: [https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip](https://sonarcloud.io/static/cpp/build-wrapper-macosx-x86.zip).

---

<div class="post-metadata">

**Author:** ![vadimux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/vadimux/32/53254_2.png) [@vadimux](https://community.sonarsource.com/u/vadimux)\
**Post date:** [January 10, 2024, 10:18am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/13 "2024-01-10T10:18:55Z")

</div>

Hi!  
does build-wrapper support for macOS 14.2.1 (Sonoma)?  
I’ve faced the same issue as the topic starter.

---

<div class="post-metadata">

**Author:** ![Candy\_Man](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/candy_man/32/46243_2.png) [@Candy\_Man](https://community.sonarsource.com/u/Candy_Man)\
**Post date:** [January 25, 2024, 8:46am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/14 "2024-01-25T08:46:33Z")

</div>

Did you solve the issue? I still get the empty result:

```auto
# (C) SonarSource SA, 2014-2023, info@sonarsource.com
# All SONARSOURCE programs and content are copyright protected.
# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.
#
# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.
# It may not be used in connection with any other software.
# Any other use is prohibited by law and may be grounds for immediate termination of your License.
{
"version":"6.52",
"captures":[
]}

```

My Mac OS is 14.0

---

<div class="post-metadata">

**Author:** ![Eric73](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@Eric73](https://community.sonarsource.com/u/Eric73)\
**Post date:** [March 26, 2024, 1:33pm UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/15 "2024-03-26T13:33:57Z")

</div>

Hi,  
Did you solve the issue? I get the same empty result with MACOS 14.4

---

<div class="post-metadata">

**Author:** ![hudson](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@hudson](https://community.sonarsource.com/u/hudson)\
**Post date:** [April 30, 2024, 7:34am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/16 "2024-04-30T07:34:36Z")

</div>

@mpaladin

Seems several people got empty result above, I got the same issue.  
Could you please advise?

# (C) SonarSource SA, 2014-2023, [info@sonarsource.com](mailto:info@sonarsource.com)

# All SONARSOURCE programs and content are copyright protected.

# SONARSOURCE and SONARQUBE are trademarks of SonarSource SA. All rights are expressly reserved.

# 

# This file is designed exclusively for use with the SONARSOURCE C / C++ / Objective-C Plugin.

# It may not be used in connection with any other software.

# Any other use is prohibited by law and may be grounds for immediate termination of your License.

{  
“version”:“6.54”,  
“captures”:[  
]}

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 30, 2024, 8:22am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/17 "2024-04-30T08:22:48Z")

</div>

Hey all.

I’m going to close this thread, as way too many things could fall under the realm of “build wrapper not working as expected” and an empty output.

Feel free to create new threads, outlining specifically

- What version of what products you’re using
- What system you’re running the build-wrapper on
- Have uploaded (or be ready to share in a private channel) your build wrapper output directory.

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 30, 2024, 8:22am UTC](https://community.sonarsource.com/t/build-wrapper-is-not-working-as-expected-objective-c-xcode/79357/18 "2024-04-30T08:22:51Z")

</div>

Closed on April 30, 2024, 8:22am UTC


