Does cocos2d-x support arm64 iPhoneSimulator build(Apple M1 simulator)?

I tried with cocos2d-x versions 3.16, 3.17 to create .xcframework bundle so that i can use arm64 iPhone Simulator.

Unfortunately generated static libs(.a) not allowing me to create .xcframework with the below error:
error: binaries with multiple platforms are not supported ‘/Users/…/Library/Developer/Xcode/DerivedData/cocos2d_libs-dblupjckulxzszdihupnxykfhiaq/Build/Products/Release-iphonesimulator/libcocos2d_iOS.a’

After analyzing the .a file using "otool -l -arch arm64 libcocos2d_iOS.a " came to know its creating arm64 for iPhone platform not for iPhoneSimulator.

Can anyone help me on this?
Thank you!

do this way you can easily run on any mac architecture.

@AGamer, I was able to build and generate arm64 static libs for iPhone simulator, but getting below errorat runtime.

“ld: in /Users/…/Documents/Workspace/…/iOS/DerivedData/XCFramework/Build/Products/Release-iphonesimulator/libcocos2d_iOS.a(btAxisSweep3.o), building for iOS Simulator, but linking in object file built for iOS, file ‘/Users/…/Documents/Workspace/…/iOS/DerivedData/XCFramework/Build/Products/Release-iphonesimulator/libcocos2d_iOS.a’ for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)”

@vishnu_arikatla once delete ALL DerivedData AND xcode catch and tray again may be this is just catch related issue.