I'm getting the same error.
I have
CLANG_MODULES_AUTOLINK set to
NO, both
WatchConnectivity and
WatchKit frameworks linked explicitly (the extension is written in Objective-C).
Turned out
libWKExtensionMainLegacy.a in
Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.0.sdk supports
x86_64,
i386, and
arm64.
Code Block |
$ lipo -archs libWKExtensionMainLegacy.a |
x86_64 arm64 i386 |
However, according to the link
https://developer.apple.com/forums/thread/130684, the configuration might not be correct.
Having x8664 code is not sufficient to distinguish if a binary is intended for the iOS Simulator, a macOS app, or a Mac Catalyst app. Combing built binaries across different destinations (which includes the simulator vs. device binaries) is not a supported combination -- there is no Apple platform where ARM code and x8664 code in the same binary is a correct configuration.
Stripping the
arm64 from the binary didn't help (just did it for testing, it couldn't be treated as a solution anyway), and got a new warning:
Code Block Showing Recent Issues |
|
Ignoring file .../Xcode12-beta3.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.0.sdk/usr/lib/libWKExtensionMainLegacy.a, missing required architecture arm64 in file .../Xcode12-beta3.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator7.0.sdk/usr/lib/libWKExtensionMainLegacy.a (2 slices) |
and error:
Code Block Showing Recent Issues |
|
In .../Xcode12-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.watchos.a(floatditf.c.o), building for watchOS Simulator, but linking in object file (.../Xcode12-beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.watchos.a(floatditf.c.o)) built for watchOS, file '.../Xcode12-beta3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/lib/darwin/libclang_rt.watchos.a' for architecture arm64 |