airbnb / lottie-ios

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

Lottie does not compile with Xcode 13.2.1 for min macOS 11 project #1995

Closed iwan-ua closed 1 year ago

iwan-ua commented 1 year ago

Which Version of Lottie are you using?

Lottie 4.1.3

Expected Behavior

Lottie compiles on Xcode 13.2.1. My project supports macOS 11 and up.

Actual Behavior

Lottie does not compile with Xcode 13.2.1

Some Errors: .../checkouts/lottie-ios/Sources/Private/Model/DotLottie/DotLottieUtils.swift:19:34: 'temporaryDirectory' is only available in macOS 10.12 or newer

.../checkouts/lottie-ios/Sources/Private/Model/DotLottie/Zip/Data+Compression.swift:86:18: 'compression_stream_init' is only available in macOS 10.11 or newer

.../checkouts/lottie-ios/Sources/Private/Model/DotLottie/Zip/Data+Compression.swift:88:13: 'compression_stream_destroy' is only available in macOS 10.11 or newer

My comments

It probably compiles fine in Xcode 14.2, because Xcode 14.2 can compile macOS 10.13 minimum. You state in https://github.com/airbnb/lottie-ios/blob/master/Package.swift, that .macOS("10.10") is supported.

calda commented 1 year ago

Thanks for the report! Fixed in #2050.

The issue was that our CI job works through the Lottie (macOS) target in Lottie.xcodeproj (which unintentionally had MACOSX_DEPLOYMENT_TARGET = 10.13) instead of through the Package.swift file. From now on we'll make sure these are in sync.