Failed to load Info.plist from bundle at path Frameworks/RCTVibration.framework/Info.plist: No such file or directory (React Native)

I've been having a problem for a few hours now and I can't figure out where it's coming from...

The error that appears at the end of my Xcode build when launching the application on the simulator:

Failed to load Info.plist from bundle at path Library/Developer/CoreSimulator/Devices/04F64287-.../data/Library/Caches/PATH ABOUT MY APP HERE/Frameworks/RCTVibration.framework; 

Couldn't stat Library/Developer/CoreSimulator/Devices/04F64287-.../data/Library/Caches/PATH ABOUT MY APP HERE/RCTVibration.framework/Info.plist: No such file or directory

I have tried several times:

  • Pod deintegrate && pod install
  • Delete node_modules
  • Clean build folder
  • Restart my computer
  • Reclone my project
  • Erase my simulators multiple times
  • Erase Derived Data from Xcode
  • XCode cleanly with the temporary/cache files and reinstalled taking care to delete all the data from the simulators before compiling

Here is my Podfile:

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'

target 'X' do
  config = use_native_modules!
  use_frameworks!
  
  # Convert all permission pods into static libraries
  pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}

    installer.pod_targets.each do |pod|
      if pod.name.eql?('RNPermissions') || pod.name.start_with?('Permission-') || pod.name.eql?('RNScreens')
        def pod.build_type;
          Pod::BuildType.static_library # >= 1.9
        end
      end
    end
  end
  
  pod 'X'
  pod 'Firebase/Crashlytics'
  # Recommended: Add the Firebase pod for Google Analytics
  pod 'Firebase/Analytics'

  
  use_react_native!(
    :path => config[:reactNativePath]
  )
  
  rn_maps_path = '../node_modules/react-native-maps'
#  pod 'react-native-google-maps', :path => rn_maps_path
  pod 'GoogleMaps'
  pod 'Google-Maps-iOS-Utils'
  
  permissions_path = '../node_modules/react-native-permissions/ios'
  pod 'Permission-Notifications', :path => "#{permissions_path}/Notifications"
  pod 'Permission-LocationWhenInUse', :path => "#{permissions_path}/LocationWhenInUse"

  post_install do |installer|
    react_native_post_install(installer)
  
    installer.pods_project.targets.each do |target|
      target.build_configurations.each do |config|
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    
      if (target.name&.eql?('FBReactNativeSpec'))
        target.build_phases.each do |build_phase|
          if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
            target.build_phases.move(build_phase, 0)
          end
        end
      end
    end
  end

end

None of these manipulations worked so I'm interested if you have any ideas

Thanks you!

Replies

Had the same issue in Pod v1.11.2. I tried restarting the simulator, erasing content, restarting the machine, removed derived data from File->WorkSpace settings -> {derived data}

Nothing worked for me. Finally, the below magic steps helped,

  1. In the pod file replace 'use_frameworks!' with 'use_frameworks! :linkage => :static'
  2. Run 'pod install' // now you might get some other issue
  3. Revert 'use_frameworks! :linkage => :static' changes i.e replace 'use_frameworks! :linkage => :static' with 'use_frameworks!'
  4. Again run 'pod install'

I also tried all the methods mentioned above, but they didn't work, and when I debugged all the Cocoapod and XcodeProj in Ruby, it was confirmed that the problem occurred due to the special setting. It may be a unique case, but it is very simple to check, so I recommend you to try it...

if ENV['INFOPLIST_FILE'] has a file for any Info.plist, CocoaPods doesn't make Info.plist for Pod targets. reference: https://github.com/CocoaPods/Xcodeproj/blob/29cd0821d47f864abbd1ca80f23ff2aded0adfed/lib/xcodeproj/project/object/build_configuration.rb#L115

I put this phrase in for the test and I was able to confirm that the file existed.

puts "#{ENV['INFOPLIST_FILE']}"

Finally, I could solved adding this line on top of Podfile.

ENV['INFOPLIST_FILE'] = nil

By the way, I don't know how I ended up assigning a specific Info.plist file to ENV...

Add a Comment

I am facing the same issue but I am using the swift package manager instead of Pod. How I will resolve this issue.