Open mycroftcanner opened 3 years ago
Here is a workaround:
mkdir -p iphoneos iphonesimulator cp -rp Hello.framework iphoneos mv Hello.framework iphonesimulator lipo -remove x86_64 ./iphoneos/Hello.framework/Hello -o ./iphoneos/Hello.framework/Hello lipo -remove arm64 ./iphonesimulator/Hello.framework/Hello -o ./iphonesimulator/Hello.framework/Hello xcodebuild -create-xcframework -framework iphoneos/Hello.framework -framework iphonesimulator/Hello.framework -output Hello.xcframework
It seems Xcode 12.5 requires both x86_64-apple-ios-simulator and arm64-apple-ios-simulator
cc @hyangah @eliasnaur
Having same issue.
Having same issue too. This will be relevant for all projects that want to be on xcode 12+. There is neccessary to have xcframeworks with iOS and iOS simulator architecture or it will be very problematic for unit tests, building project etc..
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
gomobile bind -target=ios golang.org/x/mobile/example/bind/hello
What did you expect to see?
Framework binaries with multiple platforms are not supported anymore.
gomobile bind should generate a universal xcframework
What did you see instead?
We are supposed to use an xcframework instead