I follow tutorial from integration-into-xcode, it worked for Xcode 9, In Xcode 10, Select File -> Project/Workspace Setting, there is a Build System option, the new build system is selected as default, with this default setting, the clang path is always set as /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
, the value of ExecPath
from Obfuscator.xcspec file is not respected, how can I make it work with new build system?
Asked
Active
Viewed 983 times
6

gabbler
- 13,626
- 4
- 32
- 44
-
did you figure this out? I'm battling with this as well. – Lukas Apr 22 '20 at 08:18
-
@pechar, no I haven't, have to keep using old build system. – gabbler Apr 22 '20 at 08:28
-
I've been looking into https://github.com/HikariObfuscator/Hanabi but unfortunately it doesn't seem to be working either. The commands are definitely running as when I mistyped certain parameters it failed to compile but the result is the same binary when I check it with `nm` – Lukas Apr 23 '20 at 06:58
2 Answers
0
It seems that XCode10 does not handle the ExecPath
key anymore.
One possible solution is to override CC
, LD
, and AR
to achieve a similar result. This can be done in two different ways:
- within the plugin, for instance by creating a new compiler option named
CC
. - As a "User-Defined Setting" in the build settings window or your project/target. Just create a setting named
CC
and set it to the value you would have put in theExecPath
key.
Both solutions rely on the same mechanism. If defined, these variables are used in place of the selected toolchain. These are empty by default. However, according to my test, this was a bit different in previous versions of XCode where the variable were first resolved by XCode (I believe using whereis). e.g. defining CC=echo
, XCode9 compiles with /bin/echo
while XCode10 compiles with echo
. If the executable cannot be found by XCode9, this may result in a freeze on an indexing task.

Kevin Audrezet
- 101
- 1
- 4