I've seen this problem a few times, but I would like to get to the bottom of it. I integrate the
FBSDKLoginKit library in a project. https://github.com/facebook/facebook-ios-sdk
It's a static library that seems to contain some Swift as well, so I assume it's built for library distribution.
FBSDKLoginKit.swiftmodule contains a swiftdoc, swiftinterface and swiftmodule for each supported architecture and platform. I'm building for the iOS simulator on an Apple Silicon machine, but when I tried to import the library, this error is encountered:
error: unable to load standard library for target 'arm64-apple-ios9.0' error: failed to build module 'FBSDKLoginKit' from its module interface; the compiler that produced it, 'Apple Swift version 5.2.4 (swiftlang-122.214.171.124 clang-1126.96.36.199)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.1 (swiftlang-1200.0.41 clang-1188.8.131.52)'
What's causing this? From what I can see, the library contains a slice for
arm64-apple-ios but not for
arm64-apple-ios-simulator, so maybe it's missing this slice? I've seen this error some other times not on Apple Silicon, so I'm scared that in some cases the produced module is not forward compatible (or is the error message saying the wrong thing)?
Would appreciate some explanation on this.