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- clang-1403.'). 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)

Most upvoted comments

Not fixed with Xcode 14.3 RC1.

I believe the issue is caused by the fix in apple/swift#60672.

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.

The best workaround for now is still to use lottie-ios rather than lottie-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.

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:

The Xcode “Strict Concurrency Checking” setting is not correctly passed to the compiler. If you set it to “Minimal” (the default), the compiler will still perform “Targeted” checks. (105637789)

Workaround: Add -Xfrontend -strict-concurrency=minimal to OTHER_SWIFT_FLAGS under your project’s Build Settings, or add -Xswiftc -strict-concurrency=minimal when running swift build.