I have a project that I recently upgraded to Xcode 10 Beta 5, however, using the CLI xcodebuild now gives me this error:
"Illegal instruction: 4"
Some troubleshooting determined that the xcconfig file specified in the xcodebuild command causes the problem, specifically the conditional e.g. [sdk=iphoneos*].
Omitting this conditional allows the build to run fine. It runs fine within Xcode as well. However, we need the CLI to work.
Reproducible steps:
- Create an empty Xcode Project
- Create an xcconfig for its target
- Add a line e.g. CODE_SIGN_IDENTITY[sdk=iphoneos*] = iPhone Developer
- Attempt to build from CLI specifying the xcconfig file. (It will fail)
- Change the line to CODE_SIGN_IDENTITY = iPhone Developer . Build will work.