React-native-fs: react-native 0.60 auto-linking doesn't work for iOS

Created on 6 Jul 2019  路  4Comments  路  Source: itinance/react-native-fs

I started looking into this when I got the same error mentioned here #703

React-Native 0.60 introduced "auto-linking" native modules. This module auto-links correctly in Android but no in iOS which required me to manually add this to my podfile pod 'RNFS', :path => '../node_modules/react-native-fs'. React-Native 0.60 also ships with Cocoa Pods so perhaps this lib should be updated to reflect the auto-linking feature in latest RN as well as Cocoa Pods.

Most helpful comment

I faced this problem and the only solution was to add this line use_native_modules! after the pods and before the end.
check the ios/Podfile here: https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.61.5 line 42

All 4 comments

For me I had to delete Podfile.lock file AND Pods dir, then the issue was resolved.

For me I had to delete Podfile.lock file AND Pods dir, then the issue was resolved.

Don't forget pod install

I have the same issue, auto-linking work fine on Android but iOS still need to link through pod file.

I faced this problem and the only solution was to add this line use_native_modules! after the pods and before the end.
check the ios/Podfile here: https://react-native-community.github.io/upgrade-helper/?from=0.59.9&to=0.61.5 line 42

Was this page helpful?
0 / 5 - 0 ratings