airbnb / lottie-ios

An iOS library to natively render After Effects vector animations
http://airbnb.io/lottie/
Apache License 2.0
25.7k stars 3.74k forks source link

Swift Package Manager xcframework is not building with Swift 6 toolchain #2424

Closed shivatinker closed 3 months ago

shivatinker commented 3 months ago

Which Version of Lottie are you using?

Lottie 4.4.3, imported into project via https://github.com/airbnb/lottie-spm

Expected Behavior

Our project should build with Swift 6 toolchain

Actual Behavior

We are getting this error:

Failed to build module 'Lottie'; this SDK is not supported by the compiler (the SDK is built with 'Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)', while this compiler is 'Apple Swift version 6.0 effective-5.10 (swiftlang-6.0.0.3.300 clang-1600.0.20.10)'). Please select a toolchain which matches the SDK.

Also there is a bunch of errors like those: image

We would like to get some estimates on this issue, because it effectively blocks our builds on Xcode 16 beta. Probably we will try to build Lottie from source or create a fork, but anyways I am just letting you know about this problem 👌

calda commented 3 months ago

Does it work if you use lottie-ios instead of lottie-spm?

shivatinker commented 3 months ago

Thanks for the quick response!

Yes, it works with lottie-ios. Interestingly, after I added lottie-ios, builded, and replaced it with lottie-spm again, it somehow compiled. I cleaned caches and DerivedData multiple times before and had the same error, but now it seems to work with lottie-spm. I guess this is some kind of package manager bug.

I think this is resolved for now, if anyone will get same issue, re-adding package into project seems to help! Thanks again.