React-native-fetch-blob: undefined is not an object (evaluating 'RNFetchBlob.DocumentDir

Created on 2 Aug 2017  路  17Comments  路  Source: wkh237/react-native-fetch-blob

## my project is swift with pod, i already add #import in my headers, it always that "undefined is not an object (evaluating 'RNFetchBlob.DocumentDir". I found the RNFetchBlob is undfined. I don't know why.

react-native:0.42.3
xcode:8.3.3

Most helpful comment

All 17 comments

i solved this by manually link it, but must delete RNFetchBlob's directory and remove its files outside.

I have the same problem, any solutions?

captura de pantalla 2017-08-02 a la s 15 59 27

@Birdmaaant I think its because RNFetchBlob鈥榮 class in a file directory not a Group on ios,so that RNFetchBlob module is unfined.

Hi, I got the same problem in iOS too.
I just tried to add "RNFetchBlob.xcodeproj" to "Libraries" folder and linked "libRNFetchBolb.a" to Libraries but the problem still exist.
How can you solve the problem?

Oh... I solved the problem by reinstall whole application.

I had the same problem on Android :/

Did you use
react-native link
and
RNFB_ANDROID_PERMISSIONS=true react-native link

That's all I know....

you need to clean all cache and relaunch the app again .
for ios:
rm -rf ./ios/build
watchman watch-del-al
rm -rf $TMPDIR/react-*
lsof -ti :8081 | xargs kill -9
react-native run-ios

I believe so is android

maybe you forget to add RNFetchBlobPackage in android, please check it.

I already worked, I had to reinstall the package. :)

try this:
react-native link react-native-fetch-blob
react-native run-android

i solved this problem by reinstall the application.

After linking you need to run
pod update

Does anyone know why RNFB doesn't automatically add android permissions after 0.9.4?

@GROL it's work, thank's !

Works after checked the doc linked by @GROL and used rn-fetch-blob instead of react-native-fetch-blob

Was this page helpful?
0 / 5 - 0 ratings