The core needs to solve the universal linking issue before the plugin can follow up to fully support the emulator.
The catch is that Solar2D’s current (3717) linking approach has some plugins that use lipo to merge archives of different ABI’s, or Architecture, one arm64
and one x86_64
, where arm64
refers specifically to the iPhone, not the iPhone Simulator on Apple Silicon. x86_64
refers to the Intel iPhone Simulator.
For example, Bytemap Release v8’s iphone and iphone-sim archive files are binary same. lipo
found that there are arm64
and armv7
archives, without x86_64
it cannot support intel emulators, and of course, because the arm64
here is an iphone and not an iphone sim, it cannot support Apple Silicon emulators. As for deprecated armv7
, it should be that the plugin template used has not been updated.
I have tried using lipo, which is unable to merge an archive with different platforms but the same ABI, such as iPhone arm64
and iPhone Simulator arm64
. I partially used the xcframework for internal linking on the OpenSSL v3 plug-in here, file is too much need to manually load the diff ios/lib/libcrypto.xcframework/Info.plist
.
My little idea is that you need to start with libplayer.a
on Apple targets and change the way that archive links projects to Apple’s universal xcframework, which contains all the support files for different Platforms and ABIs. Xcode can only link a xcframework to compile the binaries for different platforms and ABIs, otherwise you need to change the link option separately, which is what Solar2D does now.
After the above core is changed to the universal architecture, it is also necessary to change the template of the plug-in so that all plug-ins or libraries linked to the main program are developed and linked using this method in order to make the final binary support emulator.