Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

undefined is not an object (evaluating 'RNFetchBlob.DocumentDir #454

Closed
sunny635533 opened this issue Aug 2, 2017 · 17 comments
Closed

undefined is not an object (evaluating 'RNFetchBlob.DocumentDir #454

sunny635533 opened this issue Aug 2, 2017 · 17 comments

Comments

@sunny635533
Copy link

sunny635533 commented Aug 2, 2017

## my project is swift with pod, i already add #import <react-native-fetch-blob/RNFetchBlob.h> 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

@sunny635533
Copy link
Author

sunny635533 commented Aug 2, 2017

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

@epajarito
Copy link

I have the same problem, any solutions?

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

@sunny635533
Copy link
Author

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

@wayne1203
Copy link

wayne1203 commented Aug 3, 2017

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?

@wayne1203
Copy link

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

@ghost
Copy link

ghost commented Aug 3, 2017

I had the same problem on Android :/

@wayne1203
Copy link

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

That's all I know....

@RonnieRen
Copy link

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

@sunny635533
Copy link
Author

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

@GROL
Copy link

GROL commented Aug 3, 2017

Helped for me this doc https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package

@epajarito
Copy link

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

@wkh237 wkh237 closed this as completed Aug 5, 2017
@HHuiHao
Copy link

HHuiHao commented Apr 10, 2018

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

@gopikamurali
Copy link

i solved this problem by reinstall the application.

@krishan-kumar-mourya
Copy link

After linking you need to run
pod update

@jmasaki24
Copy link

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

@AlexM2807
Copy link

@GROL it's work, thank's !

@Jarzka
Copy link

Jarzka commented Feb 6, 2019

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

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

No branches or pull requests