Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: 'RCTImageLoader.h' file not found. #660

Closed
Nedvedyy opened this issue Oct 7, 2016 · 17 comments
Closed

iOS: 'RCTImageLoader.h' file not found. #660

Nedvedyy opened this issue Oct 7, 2016 · 17 comments

Comments

@Nedvedyy
Copy link

Nedvedyy commented Oct 7, 2016

Trying to add airbnb/react-native-maps to my react native project and follow the guide at https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md. Option 1,

After done, I cannot run the project in Xcode, it gives the error, 'RCTImageLoader.h' file not found.

I hv tried run rnpm link and it cannot go through,

rnpm-link info Android module react-native-maps is already linked
rnpm-link info Linking react-native-maps ios dependency
rnpm-link ERR! It seems something went wrong while linking. Error: ENOENT: no such file or directory, open '/Users/nedved/Desktop/NativeCreditcard_office/node_modules/react-native-maps/ios/AirGoogleMaps.xcodeproj/project.pbxproj'
Please file an issue here: https://github.com/rnpm/rnpm/issues

I can find the file /Users/XXXX/node_modules/react-native-maps/ios/AirGoogleMaps.xcodeproj locally, but when clicking, "Project /Users/XXXX/node_modules/react-native-maps/ios/AirGoogleMaps.xcodeproj cannot be opened because it is missing its project.pbxproj file."

Any idea?

@stephanemaillard
Copy link

Same issue as #653 and #656

@Nedvedyy
Copy link
Author

Nedvedyy commented Oct 7, 2016

So, Stephene, any solution?

@stephanemaillard
Copy link

For the moment use the v0.8.2 or follow the manual installation guide https://github.com/airbnb/react-native-maps/blob/master/docs/installation.md#option-3-manually
(I didn't tried to install it manually but this should work. Or, if you don't need the last features of the library you have better to stay with the v0.8.2 and wait for a fix)

@christopherdro
Copy link
Collaborator

Fixed in version 0.11.0

@gerard0315
Copy link

@christopherdro hi, somehow i'm still having this problem with RN0.37 and react-native-maps@0.11.0

@andrewvmail
Copy link

me too...

@andrewvmail
Copy link

@gerard0315 got a fixed for it just statically define where your react-native modules are. The header location in the package wont work if you have your project nested one level down of your node modules ...

folder scaffolding issue in my case

screenshot_2016-11-11__5_06_pm

@gerard0315
Copy link

@andrewvmail thx, I encounter this error only when I try to use Google Maps. But I will try that later

@deckchairlabs
Copy link

@andrewvmail this worked for me

@openingax
Copy link

If you use CocoaPods, may be you should check your Podfile whether you have add RCTImage, like this:

pod 'React', :path => '../node_modules/react-native', :subspecs => [ 'Core', 'CxxBridge', 'DevSupport', 'RCTText', 'RCTImage', # add RCTImage, then **pod install** 'RCTNetwork', 'RCTWebSocket', ]

@mehulnahar
Copy link

I Did all pod setting, Framework added, Also header search path setting, But still 'RCTImageLoader.h' file not found this issue is not getting fixed.

@GunnarAK
Copy link

GunnarAK commented Oct 9, 2019

I got this issue on RN0.61.1
#import <React/RCTImageLoader.h> in AIRMapOverlay.m gives error:
'React/RCTImageLoader.h' file not found

Here is my podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, "9.0"
require_relative "../node_modules/@react-native-community/cli-platform-ios/native_modules"

target "project" do
  project "project"
  rn_maps_path = "../node_modules/react-native-maps"
  lib_path = "../node_modules/bike-app-library"

  pod "React", :path => "../node_modules/react-native/"
  pod "React-Core", :path => "../node_modules/react-native/"
  pod "React-Core/RCTWebSocket", :path => "../node_modules/react-native/"
  pod "React-RCTActionSheet", :path => "../node_modules/react-native/Libraries/ActionSheetIOS"
  pod "React-RCTAnimation", :path => "../node_modules/react-native/Libraries/NativeAnimation"
  pod "React-RCTBlob", :path => "../node_modules/react-native/Libraries/Blob"
  pod "React-RCTImage", :path => "../node_modules/react-native/Libraries/Image"
  pod "React-RCTLinking", :path => "../node_modules/react-native/Libraries/LinkingIOS"
  pod "React-RCTNetwork", :path => "../node_modules/react-native/Libraries/Network"
  pod "React-RCTSettings", :path => "../node_modules/react-native/Libraries/Settings"
  pod "React-RCTText", :path => "../node_modules/react-native/Libraries/Text"
  pod "React-RCTVibration", :path => "../node_modules/react-native/Libraries/Vibration"

  pod "React-cxxreact", :path => "../node_modules/react-native/ReactCommon/cxxreact"
  pod "React-jsi", :path => "../node_modules/react-native/ReactCommon/jsi"
  pod "React-jsiexecutor", :path => "../node_modules/react-native/ReactCommon/jsiexecutor"
  pod "React-jsinspector", :path => "../node_modules/react-native/ReactCommon/jsinspector"
  pod "ReactCommon/jscallinvoker", :path => "../node_modules/react-native/ReactCommon"
  pod "ReactCommon/turbomodule/core", :path => "../node_modules/react-native/ReactCommon"
  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"

  # React Native third party dependencies podspecs
  pod "DoubleConversion", :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
  pod "Folly", :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"
  pod "glog", :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec"

  # React Native Community dependencies podspecs
  pod "react-native-netinfo", :path => "../node_modules/@react-native-community/netinfo"

  # react-native-maps dependencies

  # react-native-geolocation-service dependencies
  pod "react-native-geolocation", path: "../node_modules/@react-native-community/geolocation"

  pod "RNCAsyncStorage", :path => "#{lib_path}/node_modules/@react-native-community/async-storage"
  pod "react-native-ble-plx", :path => "#{lib_path}/node_modules/react-native-ble-plx"
  pod "react-native-ble-plx-swift", :path => "#{lib_path}/node_modules/react-native-ble-plx"

  use_native_modules!
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "react-native-google-maps"
      target.build_configurations.each do |config|
        config.build_settings["CLANG_ENABLE_MODULES"] = "No"
      end
    end

    targets_to_ignore = %w(React yoga)
    if targets_to_ignore.include? target.name
      target.remove_from_project
    end
  end
end

@buraky84
Copy link

I got this issue on RN0.61.1
#import <React/RCTImageLoader.h> in AIRMapOverlay.m gives error:
'React/RCTImageLoader.h' file not found

Here is my podfile:

# Uncomment the next line to define a global platform for your project
platform :ios, "9.0"
require_relative "../node_modules/@react-native-community/cli-platform-ios/native_modules"

target "project" do
  project "project"
  rn_maps_path = "../node_modules/react-native-maps"
  lib_path = "../node_modules/bike-app-library"

  pod "React", :path => "../node_modules/react-native/"
  pod "React-Core", :path => "../node_modules/react-native/"
  pod "React-Core/RCTWebSocket", :path => "../node_modules/react-native/"
  pod "React-RCTActionSheet", :path => "../node_modules/react-native/Libraries/ActionSheetIOS"
  pod "React-RCTAnimation", :path => "../node_modules/react-native/Libraries/NativeAnimation"
  pod "React-RCTBlob", :path => "../node_modules/react-native/Libraries/Blob"
  pod "React-RCTImage", :path => "../node_modules/react-native/Libraries/Image"
  pod "React-RCTLinking", :path => "../node_modules/react-native/Libraries/LinkingIOS"
  pod "React-RCTNetwork", :path => "../node_modules/react-native/Libraries/Network"
  pod "React-RCTSettings", :path => "../node_modules/react-native/Libraries/Settings"
  pod "React-RCTText", :path => "../node_modules/react-native/Libraries/Text"
  pod "React-RCTVibration", :path => "../node_modules/react-native/Libraries/Vibration"

  pod "React-cxxreact", :path => "../node_modules/react-native/ReactCommon/cxxreact"
  pod "React-jsi", :path => "../node_modules/react-native/ReactCommon/jsi"
  pod "React-jsiexecutor", :path => "../node_modules/react-native/ReactCommon/jsiexecutor"
  pod "React-jsinspector", :path => "../node_modules/react-native/ReactCommon/jsinspector"
  pod "ReactCommon/jscallinvoker", :path => "../node_modules/react-native/ReactCommon"
  pod "ReactCommon/turbomodule/core", :path => "../node_modules/react-native/ReactCommon"
  pod "Yoga", :path => "../node_modules/react-native/ReactCommon/yoga"

  # React Native third party dependencies podspecs
  pod "DoubleConversion", :podspec => "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
  pod "Folly", :podspec => "../node_modules/react-native/third-party-podspecs/Folly.podspec"
  pod "glog", :podspec => "../node_modules/react-native/third-party-podspecs/glog.podspec"

  # React Native Community dependencies podspecs
  pod "react-native-netinfo", :path => "../node_modules/@react-native-community/netinfo"

  # react-native-maps dependencies

  # react-native-geolocation-service dependencies
  pod "react-native-geolocation", path: "../node_modules/@react-native-community/geolocation"

  pod "RNCAsyncStorage", :path => "#{lib_path}/node_modules/@react-native-community/async-storage"
  pod "react-native-ble-plx", :path => "#{lib_path}/node_modules/react-native-ble-plx"
  pod "react-native-ble-plx-swift", :path => "#{lib_path}/node_modules/react-native-ble-plx"

  use_native_modules!
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "react-native-google-maps"
      target.build_configurations.each do |config|
        config.build_settings["CLANG_ENABLE_MODULES"] = "No"
      end
    end

    targets_to_ignore = %w(React yoga)
    if targets_to_ignore.include? target.name
      target.remove_from_project
    end
  end
end

same issue.
root cause is React/RCTImageLoader.h is replaced with 'React/RCTImageLoaderProtocol.h' in React-Native 0.61

Please update the library.

@mbrucher
Copy link

mbrucher commented Nov 3, 2019

I think it deserves a new issue, especially since it's not as straightforward, there are other bugs like property 'imageLoader' not found on object of type 'RCTBridge *'

@piclez
Copy link

piclez commented Dec 11, 2019

@buraky84 any workaround in the meantime? Thanks.

@rmamtaventures
Copy link

I'm also facing the issue React/RCTImageLoader.h not found with Rn 61.5.
Any update?

@NicoCevallos
Copy link

check proposed solution on #3142 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests