Cannot compile on Mojave with Xcode 10

Output in native:

Building mode: release
Update xcode please.

Happens on new helloworld project.

The xcodeproj file created still works, but cannot compile from inside Cocos Creator only build.

Hi @jmparsons,

I tried now with CC v2.0.2, MacOs 10.14 and Xcode 10.
I created new build with my old game then compiled it with Xcode10.
There was no problem, it worked.

What about from Cocos Creator new project? I try to create javascript or typescript project, compiles fine, then fails on build. I have the same CC v2.0.2, Mac 10.14 and Xcode 10. Error always says upgrade Xcode after this output:

Error: Compile failed. The log file path [ /Users/user/.CocosCreator/logs/native.log ]
    at ChildProcess.B (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:15987)
    at ChildProcess.t.on (/Applications/CocosCreator.app/Contents/Resources/app.asar/editor/core/native-utils.js:1:6454)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

check the log file. any useful info inside?

Just says:

Building mode: release
Update xcode please.

I saw this post saying pretty much same thing:

I don’t know though if it’s working for @ssogut then it should work on mine as well, but click compile fails every time.

I don’t have the Android part setup, but I’m just trying to build iOS.

I was facing same problem with cocos console.
Not sure if will work for you below is what I changed to get it working:

File:
cocos2d-x-3.17/tools/cocos2d-console/plugins/plugin_compile/project_compile.py

2 Likes

I got this error just now with cocos2d-x 3.17 and the above fix worked for me.

Thank you! That’s worked for me!

For future readers, the Xcode version bug has been fixed in the upstream cocos2d-console (PR #447).

The solution above was on the right track but this is what worked for me since my Xcode version was 10.2.1 which is not a valid float.

from distutils.version import LooseVersion

...

def check_ios_mac_build_depends(self):
    version = cocos.get_xcode_version()
    if LooseVersion(version) <= LooseVersion('5'):