Build-wrapper-macosx-x86 - Analysing Objective C iOS App - XCode 10 - SonarCloud

Hi,

I’m attempting to analyse some iOS code as part of a wider project using SonarCloud. It’s built in Objective C rather than Swift and I’m encountering an error with the build-wrapper-macosx-x86

Steps:

I run:

xcodebuild -workspace App.xcworkspace -scheme Target1 -configuration Release -sdk iphoneos12.1 clean build

This succeeds and I have a fully built file with no errors.

If I then try to run it as follows:

build-wrapper-macosx-x86 --out-dir bw_output xcodebuild -workspace App.xcworkspace -scheme Target1 -configuration Release -sdk iphoneos12.1 clean build

I get the following errors:

dyld: warning: could not load inserted library '/Users/mike/dotfiles/bin/libinterceptor.dylib' into hardened process because no suitable image found.  Did find:
	/Users/mike/dotfiles/bin/libinterceptor.dylib: code signature in (/Users/mike/dotfiles/bin/libinterceptor.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/Users/mike/dotfiles/bin/libinterceptor.dylib: stat() failed with errno=1
dyld: warning: could not load inserted library '/Users/mike/dotfiles/bin/libinterceptor.dylib' into hardened process because no suitable image found.  Did find:
	/Users/mike/dotfiles/bin/libinterceptor.dylib: code signature in (/Users/mike/dotfiles/bin/libinterceptor.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/Users/mike/dotfiles/bin/libinterceptor.dylib: stat() failed with errno=1
note: Using new build system

Followed by:

** BUILD FAILED **


The following build commands failed:
	DataModelCompile

Anyone able to suggest anything here?

Useful Info:

macOS Mojave 10.14.1
XCode 10.1 (10B61)
1 Like

Hello Michael,

Could you please send us a small project (basically a hello world, maybe with some DataModel, since it might be related) that reproduces this behaviour?

Thank you,

Thanks Loic - unfortunately I’m not an iOS developer by profession so I’m going to struggle to produce this for you as I have no idea how to produce a DataModel in XCode (I’m sure I could muddle through HelloWorld). I only know enough about XCode to compile apps as needed.

I can see if one of my team can produce something but I have no idea if it’s a repeatable item - the DataModel in this case is pretty complex and the application is quite large with over 15 separate Schemes.

It would be great if someone of your team could do that. If it fails, another options might be to start from an existing app and rip it apart (each time checking that the error is still reproduced) until only something small enough to be shared with us remains…

About the DataModel, I’m not sure if the actual content of the model really matters, so maybe something simplified there would reproduce the issue too?

Another thing that could be tested, if it’s possible to you, would be running the same command line on a slightly older version of the OS.

Thank you!