Is it possible to generate .xcframework file with gomobile?
I built the .framework file with gomobile with the following command:
gomobile bind -target ios -o ../frameworks/MyFramework.framework
After that I tried to build .xcframework file with this command
xcodebuild -create-xcframework -framework "MyFramework.framework" -output "MyFramework.xcframework"
But it shows error:
error: binaries with multiple platforms are not supported '/Users/nicco/myFramework/MyFramework.framework/MyFramework'
So looks like the problem is in gomobile framework generation process.
So I see 2 solutions:
- To generate .xcframework file with gomobile.
- Change the .framework build process for being able to convert .framework generated file to .xcframework
How to do it?
this could help to generate and xcframework
you need to generate a framework for each architecture
and then just merge with xcode command
and thats all, hope this help