Thanks for getting back to me Ed! @DTS Engineer
I actually ended up figuring it out.
Building the C++ project with
cmake dirName \
-G "Unix Makefiles" \
-B buildDir \
-DCMAKE_INSTALL_PREFIX=installDir \
-DCMAKE_SYSTEM_NAME=iOS \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \ # Changed
-DCMAKE_OSX_ARCHITECTURES=arm64 \
-DCMAKE_OSX_SYSROOT=iphonesimulator \ # Changed
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0
...
Allowed me to create the XCFramework with the resulting lib and headers. The change is for the -DCMAKE_SYSTEM_PROCESSOR=aarch64 argument, changed from arm64, and the -DCMAKE_OSX_SYSROOT=iphonesimulator argument, changed from $(xcrun --sdk iphonesimulator --show-sdk-path).
I'm not sure if both or only one of the arguments solved the issue, but this allowed me to create an XCFramework that worked with an iOS simulators.
Slightly unrelated: lipo-ing the x86_64 version of the simulator lib into the arm64 lib in the XCFramework also allows it to run on x86_64 simulators, as trying to -create-xcframework with the x86_64 and arm64 simulator libs produces an error, but hacking it this way makes things work.
Topic:
Developer Tools & Services
SubTopic:
General
Tags: