0.1.1 • Public • Published


    A react-native module to download and upload files on iOS and Android.


    Installation (iOS)

    You should have pod installed.

    $ sudo gem install cocoapods
    $ pod setup
    1. Open Terminal and cd to your project folder.

    2. Install react-native-networking with npm and AFNetworking with pods:

    npm install react-native-networking --save && cd node_modules/react-native-networking && pod install && open RNNetworkingManager.xcworkspace
    1. Add necessary linking to RNNetworkingManager following these steps:

    2. Select RNNetworkingManager target

    3. Go to Build Phases, select Link Binary with Libraries

    4. Remove libPods-AFNetworking and add libAFNetworking.a using + and - signs.

    5. Close RNNetworkingManager workspace.

    6. Add and link libraries

    7. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name].

    8. Go to node_modulesreact-native-networking and add RNNetworkingManager.xcodeproj.

    9. Again, right click LibrariesAdd Files to [your project's name].

    10. Go to node_modules/react-native-networking/Pods and add Pods.xcodeproj.

    11. In XCode, in the project navigator, select your project. Add libRNNetworkingManager.a to your project's Build PhasesLink Binary With Libraries

    12. Click RNNetworkingManager.xcodeproj in the project navigator and go the Build Settings tab. Make sure 'All' is toggled on (instead of 'Basic'). Look for Header Search Paths and make sure it contains both $(SRCROOT)/../react-native/React and $(SRCROOT)/../../React - mark both as recursive.

    13. Run your project (Cmd+R)

    Installation (Android)

    • In android/setting.gradle
    include ':RNNetworkingManager', ':app'
    project(':RNNetworkingManager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-networking/android')
    • In android/app/build.gradle
    dependencies {
        compile project(':RNNetworkingManager')
    • register module (in
    import com.learnium.RNNetworkingManager.*;  // <--- import 
    public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler {
      protected void onCreate(Bundle savedInstanceState) {
        mReactRootView = new ReactRootView(this);
        mReactInstanceManager = ReactInstanceManager.builder()
          .addPackage(new MainReactPackage())
          .addPackage(new RNNetworkingManagerModule())              // <------ add here 
        mReactRootView.startReactApplication(mReactInstanceManager, "ExampleRN", null);

    (Thanks to @chirag04 for writing the instructions)

    Android Limitations

    Android currently only supports downloading at the moment.


    In your react-native project, require the module:

    var RNNetworkingManager = require('react-native-networking');
    var url = 'localhost:3000';
    // Example GET request, (download)
    RNNetworkingManager.requestFile(url, {
    }, function(results) {
    // Example POST request, (upload)
    RNNetworkingManager.requestFile(url, {
        'method': 'POST',
        'data' : 'pathToYourFileHere'
    }, function(results) {

    The GET request automatically downloads the file to the Documents/ in your app. Similarly, the POST request automatically uploads from Documents/ of your app.

    Please feel free to open issues and contribute.


    npm i react-native-networking

    DownloadsWeekly Downloads






    Last publish


    • eduedix