Describe the bug
When building for watchOS (WATCHOS or WATCHOSCOMBINED) and using the lib in Xcode, the Xcode build fails because architecture arm64 is not found.
To Reproduce
Steps to reproduce the behavior:
Build using WATCHOS platform flag
Embed the dylib in a xcframework
Use this xcframework in a Apple Watch target in Xcode.
=> Xcode fails with undefined symbols and a warning:
Describe the bug When building for watchOS (
WATCHOS
orWATCHOSCOMBINED
) and using the lib in Xcode, the Xcode build fails because architecture arm64 is not found.To Reproduce Steps to reproduce the behavior:
WATCHOS
platform flag=> Xcode fails with undefined symbols and a warning:
Expected behavior The Xcode build should succeed
Solution found Even though I am not sure it is the correct way to do so, here is how I fixed this bug: I replaced line 450 of the ios.toolchain.cmake script with:
(instead of
set(ARCHS armv7k arm64_32)
) If it is the correct way, do not hesitate to tell me, I can submit a PR for you.Environment