React-native-image-crop-picker: React/RCTImageLoader.h file not found

Created on 7 May 2018  路  20Comments  路  Source: ivpusic/react-native-image-crop-picker

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.20.1
  • react-native v0.54.2

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Build succesfully

Actual behaviour

Build failed: React/RCTImageLoader.h file not found

Steps to reproduce

  1. Add pod to podfile

  2. Run project

Attachments

Libraries:
image

Podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'

target 'onblast' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga/yoga.podspec'
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'CxxBridge', # Required For React Native 0.45.0+
    'Core',
    'DevSupport'
    # Add any other subspecs you want to use in your project
  ]

  # Pods for onblast
  pod 'Firebase/Core'
  pod 'Firebase/Auth'
  pod 'Firebase/Database'

  pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
  pod 'Google/SignIn'

  # pod 'react-native-video', :path => '../node_modules/react-native-video'

  target 'onblastTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'onblast-tvOS' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for onblast-tvOS

  target 'onblast-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "React"
      target.remove_from_project
    end
  end
end

Most helpful comment

Solved this prob by edit Podfile
Just add RCTImage module from React
PS: It's worked for me

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'RCTImage' # <- Add this line
  ]
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

All 20 comments

I have same kind of problem.

"React/RCTDefines.h file not found."

RNImageCropPicker is missing the dependency target "React". I hope the answer to your issue will solve mine too.

I have same kind of problem.

"React/RCTDefines.h file not found."

RNImageCropPicker is missing the dependency target "React". I hope the answer to your issue will solve mine too.

@QuentinNolan @4js i solved my problem by removing the line use_frameworks! from the Podfile

any update on this?

Solved this prob by edit Podfile
Just add RCTImage module from React
PS: It's worked for me

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'RCTImage' # <- Add this line
  ]
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

I'm currently running into this issue. I would rather not include the React pod explicitly as that has its collection of problems in my experience. Any other pointers would be helpful

@prcbass Yeah same here I really want to avoid that!

I ended up adding the library manually to my project and that fixed it I think

@prcbass can you tell me how I can link this library... like steps?? i m stuck tried doing a lot of things but couldn't

@sarathvad1811 Follow the instructions under the "manual linking" section of this page (https://facebook.github.io/react-native/docs/linking-libraries-ios).

Basically you need to add the .xcodeproj files from this library (found in your node_modules in the ios directory for this package) into your project and then add the .a file in the Build Phases -> Link Binary section of XCode

@prcbass Thanks! :)

@Baskerville42 seems like it works even without 'CxxBridge' (using RN 0.57.5)

Fails again on 0.61-rc2. It seems there are no such file exported from RN anymore

Hi, I am facing this issue with RN 0.60.5 and RN Image crop picker v0.24.0

What I've tried so far but it didn't fix the problem:

  1. I included s.dependency 'React-RCTImage' in the podspec for this library as @woshi82 mentioned above.

  2. I replaced
    `#if __has_include()

    import

import

else

import "RCTBridgeModule.h"

import "RCTImageLoader.h"

endif`

with

`#if __has_include()

import

import

else

import "RCTBridgeModule.h"

import "RCTImageLoader.h"

endif`

I feel this problem arises because RCTImage is now a Pod for the .xcworkspace now as opposed to a Library for the .xcodeproj

@ex3ndr https://github.com/ivpusic/react-native-image-crop-picker/blob/master/RNImageCropPicker.podspec
s.dependency 'React-RCTImage'

In my case, that dependency is already there! @woshi82

Guys, did anyone managed to solve this issue? It's really blocking me right now. Hey @ivpusic, Any thoughts on this?

I've managed to fix this. But we need to get this PR approved https://github.com/ivpusic/react-native-image-crop-picker/pull/1142

Meanwhile, you can npm i react-native-image-crop-picker@filipemerker/react-native-image-crop-picker

Solved this prob by edit Podfile
Just add RCTImage module from React
PS: It's worked for me

  pod 'React', :path => '../node_modules/react-native', :subspecs => [
    'Core',
    'CxxBridge', # Include this for RN >= 0.47
    'RCTImage' # <- Add this line
  ]
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'

I faced the same issue when I try to add react-native-cameraroll and this solution fixed for me.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pavsidhu picture pavsidhu  路  3Comments

victorwpbastos picture victorwpbastos  路  3Comments

habovh picture habovh  路  3Comments

althurzard picture althurzard  路  3Comments

phantom1299 picture phantom1299  路  3Comments