{"id":4722,"url":"https://github.com/mybigday/react-native-s3","last_synced_at":"2025-08-21T06:31:08.793Z","repository":{"id":37418219,"uuid":"53302822","full_name":"mybigday/react-native-s3","owner":"mybigday","description":"A React Native wrapper for AWS iOS/Android S3 SDK.","archived":false,"fork":false,"pushed_at":"2022-05-16T17:06:43.000Z","size":371,"stargazers_count":92,"open_issues_count":46,"forks_count":54,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-06T10:05:55.245Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mybigday.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-07T06:56:56.000Z","updated_at":"2023-10-13T20:53:48.000Z","dependencies_parsed_at":"2022-08-19T12:40:11.759Z","dependency_job_id":null,"html_url":"https://github.com/mybigday/react-native-s3","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybigday%2Freact-native-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybigday%2Freact-native-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybigday%2Freact-native-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mybigday%2Freact-native-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mybigday","download_url":"https://codeload.github.com/mybigday/react-native-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230494921,"owners_count":18235046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:21.336Z","updated_at":"2024-12-19T20:08:33.105Z","avatar_url":"https://github.com/mybigday.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["Backend"],"readme":"# React Native AWS S3\n\n[![NPM version](http://img.shields.io/npm/v/react-native-s3.svg?style=flat)](https://www.npmjs.com/package/react-native-s3)\n[![Build Status](https://travis-ci.org/mybigday/react-native-s3.svg)](https://travis-ci.org/mybigday/react-native-s3)\n[![Dependency Status](https://david-dm.org/mybigday/react-native-s3.svg)](https://david-dm.org/mybigday/react-native-s3)\n[![devDependency Status](https://david-dm.org/mybigday/react-native-s3/dev-status.svg)](https://david-dm.org/mybigday/react-native-s3#info=devDependencies)\n\nA React Native wrapper for AWS [iOS](https://github.com/aws/aws-sdk-ios)/[Android](https://github.com/aws/aws-sdk-android) S3 SDK.\n\nWe 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.\n\nSee [iOS](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/s3transferutility.html)/[Android](http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/getting-started-store-retrieve-s3-transferutility.html) docs for more information.\n\n## Known issues\n\n* Currently reload js will lead TransferUtility not work. ([#9](https://github.com/mybigday/react-native-s3/issues/9))\n\n## Installation\n\n```bash\n$ npm install react-native-s3 --save\n```\n\n## Setup\n\n#### iOS\n\n__*NOTE*__ Only supported iOS ^8.0.\n\nIn XCode, in the project navigator:\n\n* Right click `Libraries` ➜ `Add Files to [your project's name]`, Add `node_modules/react-native-s3/ios/RNS3.xcodeproj`.\n* Add `libRNS3.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`\n* Add `$(SRCROOT)/../node_modules/react-native-s3/ios` to `Header Search Paths`, and mark it as `recursive`.\n* Add `$(SRCROOT)/../node_modules/react-native-s3/ios/Frameworks` to your project's `Build Settings` ➜ `Framework Search Paths`\n* Add `node_modules/react-native-s3/ios/Frameworks/*.framework` to your project's `General` ➜ `Embedded Binaries`\n* Edit `AppDelegate.m` of your project\n\n```objective-c\n#import \"RNS3TransferUtility.h\"\n\n......\n\n- (void)application:(UIApplication *)application handleEventsForBackgroundURLSession:(NSString *)identifier completionHandler:(void (^)())completionHandler {\n  [RNS3TransferUtility interceptApplication:application\n        handleEventsForBackgroundURLSession:identifier\n                          completionHandler:completionHandler];\n}\n```\n\n* __*[Optional]*__ you can set the credentials in `AppDelegate.m`\n\n```objective-c\n#import \"RNS3TransferUtility.h\"\n\n......\n\n- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n{\n  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@\"eu-west-1\" forKey:@\"region\"];\n  [[RNS3TransferUtility nativeCredentialsOptions] setObject:[NSNumber numberWithInt:[RNS3TransferUtility credentialType:@\"BASIC\"]] forKey:@\"type\"];\n  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@\"your_access_key_here\" forKey:@\"access_key\"];\n  [[RNS3TransferUtility nativeCredentialsOptions] setObject:@\"your_secret_key_here\" forKey:@\"secret_key\"];\n  ......\n}\n```\n\n#### Android\n\n* Edit `android/settings.gradle` of your project:\n\n```gradle\n...\ninclude ':react-native-s3'\nproject(':react-native-s3').projectDir = new File(settingsDir, '../node_modules/react-native-s3/android')\n```\n\n* Edit `android/app/build.gradle` of your project:\n\n```gradle\n...\ndependencies {\n    ...\n    compile project(':react-native-s3')\n}\n```\n\n* Add package to `MainApplication.java`\n\n```java\n......\n\nimport com.mybigday.rns3.*;   // import\n\npublic class MainApplication extends Application implements ReactApplication {\n  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n    ......\n\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n        new MainReactPackage(),\n        new RNS3Package(),  // add package\n      );\n    }\n  };\n\n  ......\n}\n```\n\nYou can use [rnpm](https://github.com/rnpm/rnpm) instead of above steps.\n\n* Edit `android/app/src/main/AndroidManifest.xml` of your project:\n\n```xml\n\u003cservice\n  android:name=\"com.amazonaws.mobileconnectors.s3.transferutility.TransferService\"\n  android:enabled=\"true\" /\u003e\n```\n\n* __*[Optional]*__ you can set the credentials in `MainActivity.java`:\n\n```java\nimport android.os.Bundle;\nimport com.mybigday.rns3.RNS3TransferUtility;\n\npublic class MainActivity extends ReactActivity {\n  @Override\n  public void onCreate(Bundle savedInstanceState) {\n    super.onCreate(savedInstanceState);\n\n    RNS3TransferUtility.nativeCredentialsOptions.put(\"region\", \"eu-west-1\");\n    RNS3TransferUtility.nativeCredentialsOptions.put(\"type\", RNS3TransferUtility.CredentialType.BASIC);\n    RNS3TransferUtility.nativeCredentialsOptions.put(\"access_key\", \"your_access_key_here\");\n    RNS3TransferUtility.nativeCredentialsOptions.put(\"secret_key\", \"your_secret_key_here\");\n  }\n\n  ......\n}\n```\n\n## The `nativeCredentialsOptions` type\n\n* `BASIC`\n* `COGNITO`\n\n## Usage\n\n```js\nimport { transferUtility } from 'react-native-s3';\n```\n\nSee [API.md](API.md) for more information.\n\n## Alternatives\n\n- [react-native-aws3](https://github.com/benjreinhart/react-native-aws3) - if you don't need the native library provided background upload/download task features.\n\n## License\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmybigday%2Freact-native-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmybigday%2Freact-native-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmybigday%2Freact-native-s3/lists"}