npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-native-s3

v0.0.29

Published

A React Native wrapper for AWS S3 SDK

Readme

React Native AWS S3

NPM version Build Status Dependency Status devDependency Status

A React Native wrapper for AWS iOS/Android S3 SDK.

We currently implements TransferUtility, it allow you to upload / download tasks in the background, very suitable for transferring large files, you can freely subscribe / unsubscribe, pause / resume / cancel the task.

See iOS/Android docs for more information.

Known issues

  • Currently reload js will lead TransferUtility not work. (#9)

Installation

$ npm install react-native-s3 --save

Setup

iOS

NOTE Only supported iOS ^8.0.

In XCode, in the project navigator:

  • Right click LibrariesAdd Files to [your project's name], Add node_modules/react-native-s3/ios/RNS3.xcodeproj.
  • Add libRNS3.a to your project's Build PhasesLink Binary With Libraries
  • Add $(SRCROOT)/../node_modules/react-native-s3/ios to Header Search Paths, and mark it as recursive.
  • Add $(SRCROOT)/../node_modules/react-native-s3/ios/Frameworks to your project's Build SettingsFramework Search Paths
  • Add node_modules/react-native-s3/ios/Frameworks/*.framework to your project's GeneralEmbedded Binaries
  • Edit AppDelegate.m of your project
#import "RNS3TransferUtility.h"

......

- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler {
  [RNS3TransferUtility interceptApplication:application
        handleEventsForBackgroundURLSession:identifier
                          completionHandler:completionHandler];
}
  • [Optional] you can set the credentials in AppDelegate.m
#import "RNS3TransferUtility.h"

......

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@"eu-west-1" forKey:@"region"];
  [[RNS3TransferUtility nativeCredentialsOptions] setObject:[NSNumber numberWithInt:[RNS3TransferUtility credentialType:@"BASIC"]] forKey:@"type"];
  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@"your_access_key_here" forKey:@"access_key"];
  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@"your_secret_key_here" forKey:@"secret_key"];
  ......
}

Android

  • Edit android/settings.gradle of your project:
...
include ':react-native-s3'
project(':react-native-s3').projectDir = new File(settingsDir, '../node_modules/react-native-s3/android')
  • Edit android/app/build.gradle of your project:
...
dependencies {
    ...
    compile project(':react-native-s3')
}
  • Add package to MainApplication.java
......

import com.mybigday.rns3.*;   // import

public class MainApplication extends Application implements ReactApplication {
  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    ......

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
        new MainReactPackage(),
        new RNS3Package(),  // add package
      );
    }
  };

  ......
}

You can use rnpm instead of above steps.

  • Edit android/app/src/main/AndroidManifest.xml of your project:
<service
  android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
  android:enabled="true" />
  • [Optional] you can set the credentials in MainActivity.java:
import android.os.Bundle;
import com.mybigday.rns3.RNS3TransferUtility;

public class MainActivity extends ReactActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    RNS3TransferUtility.nativeCredentialsOptions.put("region", "eu-west-1");
    RNS3TransferUtility.nativeCredentialsOptions.put("type", RNS3TransferUtility.CredentialType.BASIC);
    RNS3TransferUtility.nativeCredentialsOptions.put("access_key", "your_access_key_here");
    RNS3TransferUtility.nativeCredentialsOptions.put("secret_key", "your_secret_key_here");
  }

  ......
}

The nativeCredentialsOptions type

  • BASIC
  • COGNITO

Usage

import { transferUtility } from 'react-native-s3';

See API.md for more information.

Alternatives

  • react-native-aws3 - if you don't need the native library provided background upload/download task features.

License

MIT