Git Product home page Git Product logo

react-native-file-transfer's Issues

Jest Native Events

This package works great and thanks a lot for that!

The problem I have is when I try to run tests with Jest on my code. When I run the tests, I get the following error message:

Invariant Violation: Native module cannot be null.

      at invariant (node_modules\fbjs\lib\invariant.js:38:15)
      at new NativeEventEmitter (node_modules\react-native\Libraries\EventEmitter\NativeEventEmitter.js:32:1)
      at Object.<anonymous> (node_modules\@remobile\react-native-file-transfer\libs\FileTransfer.js:29:63)
      at Object.<anonymous> (node_modules\@remobile\react-native-file-transfer\index.js:2:20)

The line in my code that is the culprit is: import FileTransfer from '@remobile/react-native-file-transfer'
I've tried mocking the the module with Jest, but this does not fix the error.

The problem is caused by line 29 in FileTransfer.js: var EventEmitter = Platform.OS==="android"?DeviceEventEmitter:new NativeEventEmitter(NativeModules.FileTransfer);

Can anyone help me with this error?
Thanks.

Linking of project does not work [android] / [iOS]

When I try to use this module, and build the app for the android platform, I get the following error:

FAILURE: Build failed with an exception.

  • Where:
    Build file '/Users/gzajkovs/Workspace/seminar-app/node_modules/@remobile/react-native-file-transfer/android/build.gradle' line: 25

  • What went wrong:
    A problem occurred evaluating project ':react-native-file-transfer'.

    Project with path ':react-native-cordova' could not be found in project ':react-native-file-transfer'.

On iOS, there is the following error:
Undefined symbols for architecture x86_64:
"OBJC_CLASS$_CDVInvokedUrlCommand", referenced from:
objc-class-ref in libRCTFileTransfer.a(CDVFileTransfer.o)
"OBJC_CLASS$_CDVPlugin", referenced from:
OBJC_CLASS$_CDVFileTransfer in libRCTFileTransfer.a(CDVFileTransfer.o)
"OBJC_CLASS$_CDVPluginResult", referenced from:
objc-class-ref in libRCTFileTransfer.a(CDVFileTransfer.o)
"OBJC_METACLASS$_CDVPlugin", referenced from:
OBJC_METACLASS$_CDVFileTransfer in libRCTFileTransfer.a(CDVFileTransfer.o)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.