From 9d3a0bc6578ce870c05cfb95a9ea72373a769920 Mon Sep 17 00:00:00 2001 From: kewde Date: Wed, 19 Mar 2025 14:28:26 +0100 Subject: [PATCH] fix: support new react-native-skia folder structure --- package/react-native-skia-skottie.podspec | 27 +++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/package/react-native-skia-skottie.podspec b/package/react-native-skia-skottie.podspec index 70f2e42..42fec72 100644 --- a/package/react-native-skia-skottie.podspec +++ b/package/react-native-skia-skottie.podspec @@ -32,8 +32,31 @@ Pod::Spec.new do |s| mkdir -p libs/ rm -rf libs/ios mkdir -p libs/ios - cp -r "#{skiaPath}/libs/ios/libsksg.xcframework" libs/ios/ - cp -r "#{skiaPath}/libs/ios/libskottie.xcframework" libs/ios/ + + copied_skg=false + copied_skottie=false + + if [ -e "#{skiaPath}/libs/apple/libsksg.xcframework" ]; then + cp -r "#{skiaPath}/libs/apple/libsksg.xcframework" libs/ios/ + copied_skg=true + fi + if [ -e "#{skiaPath}/libs/apple/libskottie.xcframework" ]; then + cp -r "#{skiaPath}/libs/apple/libskottie.xcframework" libs/ios/ + copied_skottie=true + fi + if [ -e "#{skiaPath}/libs/ios/libskg.xcframework" ]; then + cp -r "#{skiaPath}/libs/ios/libskg.xcframework" libs/ios/ + copied_skg=true + fi + if [ -e "#{skiaPath}/libs/ios/libskottie.xcframework" ]; then + cp -r "#{skiaPath}/libs/ios/libskottie.xcframework" libs/ios/ + copied_skottie=true + fi + + if [ "$copied_skg" = false ] || [ "$copied_skottie" = false ]; then + echo "Error: Both libskg.xcframework and libskottie.xcframework must be copied." >&2 + exit 1 + fi CMD s.ios.vendored_frameworks = [