remobile / react-native-file-transfer Goto Github PK
View Code? Open in Web Editor NEWA file-transfer for react-native, code come from cordova, support for android and ios
License: MIT License
A file-transfer for react-native, code come from cordova, support for android and ios
License: MIT License
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.
how can i download more than one file or upload more than one file
It gives me file not found error
Not find CDVPlugin.h
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)
在react-native run-android时提示下图:
我安装了react-native-cordova-plugin之后还是同样的提示,请问要怎么解决呢?
另外 https://www.npmjs.com/package/react-native-cordova-plugin
上写到不支持IOS,请问transfer在IOS上可以正常使用吗?谢谢!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.