airbnb / lottie-ios

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

While building the app Xcode 15 an error "ios/LottieReactNative/ContainerView.swift Could not build Objective-C module 'lottie_react_native'" #2210

Closed KaterinaUK closed 1 year ago

KaterinaUK commented 1 year ago

Hi everyone, I am experiencing an issue after upgrade to XCode 15, I have an error saying "LottieReactNative/ContainerView.swift Could not build Objective-C module 'lottie_react_native'" I found a few issues but the solution provided did not work: https://github.com/lottie-react-native/lottie-react-native/issues/734 https://github.com/lottie-react-native/lottie-react-native/issues/906

I tried:

  1. pod deintegrate && rm -rf podfile.lock && pod update
  2. Quit Xcode. Delete project's temp files located at ~/Library/Developer/Xcode/DerivedData Delete ProjectName.xcworkspace Delete Podfile.lock file and Pods folder Run pod install. Open the newly created ProjectName.xcworkspace file and build.

None of these were working for me.

Screenshot 2023-10-12 at 11 15 29

Which Version of Lottie are you using?

"lottie-ios": "^3.4.0", "lottie-react-native": "^5.1.4"

Expected Behavior

The build should succeed.

Actual Behavior

Screenshot 2023-10-12 at 11 19 44

Animation JSON

NA

calda commented 1 year ago

This sounds like a problem with Lottie React Native. Please file an issue on that repo instead: https://github.com/lottie-react-native/lottie-react-native

viktasidenfy commented 1 year ago

I am experiencing the same behaviour on the iOS project. This problem occurs on xCode 14.3 and newer with use_frameworks! commented out in the podfile. It should not be connected to React Native.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '12.0'
#use_frameworks!
inhibit_all_warnings!

target 'testing' do
  pod 'lottie-ios', '4.3.3'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
    end
  end
end