lottie-ios: lottie-spm compilation fails with Xcode 14.3 beta
Which Version of Lottie are you using?
Lottie 4.1.3
Expected Behavior
Project to compile without errors
Actual Behavior
Project does not compile because of unsupported SDK by the compiler
Xcode 14.3 beta has been released and Lottie fails to compile with the following error:
Failed to build module 'Lottie'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)', while this compiler is 'Apple Swift version 5.8 (swiftlang-5.8.0.117.11 clang-1403.0.22.8.60)'). Please select a toolchain which matches the SDK.
Might be a solution for future releases: https://stackoverflow.com/a/70562356/3928565
PS: I am using the lottie-spm integration in my project
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 29 (12 by maintainers)
Not fixed with Xcode 14.3 RC1.
Yup, Jon is right. It’s been long enough that I had forgotten that global actor typechecking was missing some key checks prior to Swift 5.8. I need to confirm, but I think the fix will be to relax availability checking for
MainActor(unsafe)
because it has no ABI effect and therefore shouldn’t be constraining availability.This looks like a bug in Xcode 14.3, considering this works correctly in Xcode 14.2.
For now if you need to use the Xcode 14.3 beta i’d suggest using lottie-ios instead of lottie-spm. I’ll file a feedback with Apple to let them know about this regression.
This issue is resolved in Xcode 14.3 RC 2: https://github.com/apple/swift/pull/64412#issuecomment-1485621729
The best workaround for now is still to use
lottie-ios
rather thanlottie-spm
. I’d prefer not to have to drop support for iOS 11 / 12, but will consider that sort of workaround if this bug isn’t fixed by the time Xcode 14.3 is released.Fixing with https://github.com/apple/swift/pull/64412.
Filed as FB11994464
@calda Just a heads up, Apple is currently rejecting builds from Xcode 14.3 RC2 as “beta” if you try and ship to the store using it. I have a build on the store from RC1 so being “RC” isn’t the issue.
I’ve already contacted developer support.
This is in the known issues: