How to build cocos2dx for iOS simulator with latest Xcode?

How to build cocos2dx for iOS simulator with latest Xcode?

Currently CI builds for iOS are red/failed
V3:

V4:

@slackmoehrle could you help?

Kind regards,
Chp

I’ll need to ask @zhangxm

@R101 maybe you can help?

I haven’t tried to build Cocos2d-x v4 for iOS (although I do use a fork of v4 that works with iOS). The only thing I can see in my root project CMakeLists.txt file that may help is this:

set_target_properties(${APP_NAME} PROPERTIES
    XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] x86_64
    XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] x86_64
)    

Check this file out to see if there are any settings that are missing from Cocos2d-x v4: ios.mini.cmake

@R101 thank you for your answer. It fails on CompileStoryboard.
Any ideas on how to fix it?

Below command line and error:

CompileStoryboard /Users/runner/work/cocos2d-x/cocos2d-x/tests/cpp-tests/proj.ios/LaunchScreen.storyboard (in target 'cpp-tests' from project 'Cocos2d-x')
    cd /Users/runner/work/cocos2d-x/cocos2d-x
    /Applications/Xcode_12.4.app/Contents/Developer/usr/bin/ibtool --errors --warnings --notices --module cpp_tests -DCMAKE_SKIP_PRECOMPILE_HEADERS --output-partial-info-plist /Users/runner/work/cocos2d-x/cocos2d-x/b/engine/tests/cpp-tests/Cocos2d-x.build/Release-iphonesimulator/cpp-tests.build/LaunchScreen-SBPartialInfo.plist --auto-activate-custom-fonts --target-device iphone --minimum-deployment-target 9.0 --output-format human-readable-text --compilation-directory /Users/runner/work/cocos2d-x/cocos2d-x/b/engine/tests/cpp-tests/Cocos2d-x.build/Release-iphonesimulator/cpp-tests.build /Users/runner/work/cocos2d-x/cocos2d-x/tests/cpp-tests/proj.ios/LaunchScreen.storyboard
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>com.apple.ibtool.errors</key>
	<array>
		<dict>
			<key>description</key>
			<string>Unable to rename classes, class name parsing failed.</string>
		</dict>
		<dict>
			<key>description</key>
			<string>Not enough arguments provided; where is the input document to operate on?</string>
		</dict>
	</array>
</dict>
</plist>
Command CompileStoryboard failed with a nonzero exit code

No idea about that error, but as I mentioned in my previous post, the iOS builds work in that Cocos2d-x fork I linked, so perhaps comparing the two may shed some light on the issue.

@slackmoehrle any progress? Did you have a chance to ask engineer team?

I will check on the status, I know the team has been really busy with upcoming releases.