Skip to content

Commit 0ebbfd8

Browse files
committed
chore: update instructions
1 parent 2b6c615 commit 0ebbfd8

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

README.md

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,13 @@ const handleCancel = () => {
7575

7676
## Example
7777

78+
*NPM package does not include the example app. If you need it, please clone the GitHub repository and run the example app from there.*
79+
7880
Under the `example` directory, you can find a complete React Native application that demonstrates how to use this library. It includes:
7981
- A simple UI for selecting a file and uploading it to Qiniu.
8082
- Progress tracking and cancellation functionality.
8183

82-
```sh
83-
yarn example install
84-
85-
# Starting Android
86-
yarn example android
87-
88-
# Starting iOS
89-
cd example/ios
90-
bundle install
91-
bundle exec pod install
92-
cd ../..
93-
yarn example ios
94-
```
84+
To run the example app, please follow the instructions in `example/README.md`.
9585

9686
-----
9787

example/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@ This is a new [**React Native**](https://reactnative.dev) project, bootstrapped
44

55
> **Note**: Make sure you have completed the [Set Up Your Environment](https://reactnative.dev/docs/set-up-your-environment) guide before proceeding.
66
7+
## Step 0. Configure Qiniu credentials
8+
9+
Before running the example, you need to configure your Qiniu AK, SK and bucket name in the `example/src/App.tsx` file. Make sure to replace the placeholder values with your actual credentials.
10+
11+
```javascript
12+
// example/src/App.tsx
13+
14+
// =[!]= IMPORTANT: This is only for testing purposes. Do NOT use this in production. =[!]=
15+
// Distribute your own access key and secret key from server instead of hardcoded.
16+
17+
// Replace with your own bucket name, access key, and secret key.
18+
const BUCKET_NAME = 'your-bucket-name'; // Replace with your actual bucket name
19+
const AK = 'your-access-key'; // Replace with your actual Access Key
20+
const SK = 'your-secret-key'; // Replace with your actual Secret Key
21+
```
22+
723
## Step 1: Start Metro
824

925
First, you will need to run **Metro**, the JavaScript build tool for React Native.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@
4343
"keywords": [
4444
"react-native",
4545
"ios",
46-
"android"
46+
"android",
47+
"qiniu",
48+
"kodo",
49+
"turbo-module"
4750
],
4851
"repository": {
4952
"type": "git",

0 commit comments

Comments
 (0)