From b374815cfdc2b13c0894a9775c3ba837c739a8ee Mon Sep 17 00:00:00 2001 From: Philip Su <39933441+fivecar@users.noreply.github.com> Date: Sat, 4 Feb 2023 01:38:13 -0800 Subject: [PATCH] docs: fixes README to use the right badge and package name in instructions --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 420acc0..bb071f9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![react-native-background-downloader banner](https://d1w2zhnqcy4l8f.cloudfront.net/content/falcon/production/projects/V5EEOX_fast/RNBD-190702083358.png) -[![npm version](https://badge.fury.io/js/react-native-background-downloader.svg)](https://badge.fury.io/js/react-native-background-downloader) +[![npm version](https://badge.fury.io/js/@kesha-antonov%2Freact-native-background-downloader.svg)](https://badge.fury.io/js/@kesha-antonov%2Freact-native-background-downloader) -# react-native-background-downloader +# @kesha-antonov/react-native-background-downloader ## *Note - This is fork of https://github.com/EkoLabs/react-native-background-downloader maintained by https://github.com/kesha-antonov * ## A library for React-Native to help you download large files on iOS and Android both in the foreground and most importantly in the background. @@ -16,7 +16,7 @@ On Android we are simulating this process with a wonderful library called [Fetch The real challenge of using this method is making sure the app's UI is always up-to-date with the downloads that are happening in another process because your app might startup from scratch while the downloads are still running. -`react-native-background-downloader` gives you an easy API to both downloading large files and re-attaching to those downloads once your app launches again. +`@kesha-antonov/react-native-background-downloader` gives you an easy API to both downloading large files and re-attaching to those downloads once your app launches again. > **Please Note** - This library was created to better facilitate background downloading on iOS. If you're not aiming to to use the download-in-background functionality, there are better solutions like [RNFS.downloadFile()](https://github.com/itinance/react-native-fs#downloadfileoptions-downloadfileoptions--jobid-number-promise-promisedownloadresult-) which will results in a more stable download experience for your app. @@ -48,7 +48,7 @@ Any React Native version **`>= 0.60`** supports autolinking so nothing should be For anything **`< 0.60`** run the following link command -`$ react-native link react-native-background-downloader` +`$ react-native link @kesha-antonov/react-native-background-downloader` ### Manual installation @@ -57,7 +57,7 @@ For anything **`< 0.60`** run the following link command #### iOS 1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]` -2. Go to `node_modules` ➜ `react-native-background-downloader` and add `RNBackgroundDownloader.xcodeproj` +2. Go to `node_modules` ➜ `@kesha-antonov/react-native-background-downloader` and add `RNBackgroundDownloader.xcodeproj` 3. In XCode, in the project navigator, select your project. Add `libRNBackgroundDownloader.a` to your project's `Build Phases` ➜ `Link Binary With Libraries` 4. Run your project (`Cmd+R`) @@ -69,7 +69,7 @@ For anything **`< 0.60`** run the following link command 2. Append the following lines to `android/settings.gradle`: ``` include ':react-native-background-downloader' - project(':react-native-background-downloader').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-background-downloader/android') + project(':react-native-background-downloader').projectDir = new File(rootProject.projectDir, '../node_modules/@kesha-antonov/react-native-background-downloader/android') ``` 3. Insert the following lines inside the dependencies block in `android/app/build.gradle`: ``` @@ -100,7 +100,7 @@ Failing to add this code will result in canceled background downloads. If Xcode ```javascript import { Platform } from 'react-native' -import { download, completeHandler } from 'react-native-background-downloader' +import { download, completeHandler } from '@kesha-antonov/react-native-background-downloader' const jobId = 'file123' @@ -144,7 +144,7 @@ What happens to your downloads after the OS stopped your app? Well, they are sti Add this code to app's init stage, and you'll never lose a download again! ```javascript -import RNBackgroundDownloader from 'react-native-background-downloader' +import RNBackgroundDownloader from '@kesha-antonov/react-native-background-downloader' let lostTasks = await RNBackgroundDownloader.checkForExistingDownloads() for (let task of lostTasks) {