@zhangxm, @Rusty
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 for some of the object files (.o ) its creating arm64 iPhone platform not for iPhoneSimulator.
I was able to build and generate arm64 static libs for iPhone simulator, but getting below error at 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)”