0

After updating to React Native 0.60 the header linking does no longer work.

I'm having problems linking from the React library during build:

/Users/User/Developer/Project/node_modules/react-native-image-resizer/ios/RCTImageResizer/RCTImageResizer.m:12:9: fatal error: 'React/RCTImageLoader.h' file not found
#import <React/RCTImageLoader.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~

What changed in 0.60:

  • The file RCTImageLoader.h is now at /node_modules/react-native/React/CoreModules.
  • The file React.xcodeproj that contained these headers is no longer present

React Native folder

Peter G.
  • 7,816
  • 20
  • 80
  • 154

2 Answers2

2

It took me 3 hours. Finally I found the solution:

Use specific version 1.1.0 by running the command:

npm install react-native-image-resizer@1.1.0  

Then run the command:

cd ios && pod install 
Doan Bui
  • 3,572
  • 25
  • 36
1

There were many changes in React Native 0.60, one of the main ones is that React modules are now packaged using CocoaPods, which replaces header linking.

I recommend you generate a new project in 0.60+ and check out its project structure (mainly the Podfile). You can also use the upgrade helper to see what's changed.

Petr Bela
  • 8,493
  • 2
  • 33
  • 37