Closed apps4everyone closed 1 year ago
Can you please share a sample project that demonstrates this issue?
Also, make sure you're embedding "Lottie.framework" in your app binary in the Xcode "Embedded Libraries" panel
Hey, hopefully this project is ok, please change team and bundle identifiers so you can run on your device.
PS: thx for the quick reply
Thanks for the sample project. It builds and runs successfully after I add the Lottie library under "Frameworks, Libraries, and Embedded Content":
Hey, sorry for the late reply but this is only a bad workaround because this would copy the binary twice to the app. And also this is not needed with the non XCFramework version in https://github.com/airbnb/lottie-ios/ I guess it is a SPM related bug.
The transitive dependency should work without adding the Lottie library under "Frameworks, Libraries, and Embedded Content" again. It is already in LottieTest -> LottieTestFrameworkKit -> LottieTestFramework Or why it is working with https://github.com/airbnb/lottie-ios/ ?
here is the example with https://github.com/airbnb/lottie-ios/ LottieTestNONSPM.zip
I guess this is not 100% working when used in sub dependencies https://github.com/airbnb/lottie-spm/blob/main/Package.swift#L20
// Without at least one regular (non-binary) target, this package doesn't show up // in Xcode under "Frameworks, Libraries, and Embedded Content". That prevents // Lottie from being embedded in the app product, causing the app to crash when // ran on a physical device. As a workaround, we can include a stub target // with at least one source file. .target(name: "_LottieStub"),
If embedding the library in that way doesn't work for your use case, you could continue using the lottie-ios repo.
Hey,
wanted to switch to lottie-spm but the app is crashing on device when used inside a framework target (not directly in the main app target.
My main app
On device there is the crash with this error: (no such file)Library not loaded: @rpath/Lottie.framework/Lottie
Only change: https://github.com/airbnb/lottie-ios.git -> https://github.com/airbnb/lottie-spm.git