Ben Hsieh 8 gadus atpakaļ
vecāks
revīzija
1b8f4ba0ec
5 mainītis faili ar 44 papildinājumiem un 8 dzēšanām
  1. 17
    3
      README.md
  2. Binārs
      img/issue_57_1.png
  3. Binārs
      img/issue_57_2.png
  4. Binārs
      img/issue_57_3.png
  5. 27
    5
      src/README.md

+ 17
- 3
README.md Parādīt failu

@@ -47,11 +47,11 @@ Link package using [rnpm](https://github.com/rnpm/rnpm)
47 47
 rnpm link
48 48
 ```
49 49
 
50
-### Manually link package
50
+### Manually link the package (Android)
51 51
 
52 52
 If rnpm link command failed to link the package automatically, you might try manually link the package.
53 53
 
54
-Edit add package to`android/settings.gradle`
54
+Open `android/settings.gradle`, and add these lines which will app RNFetchBlob Android project dependency to your app.
55 55
 
56 56
 ```diff
57 57
 include ':app'      
@@ -59,7 +59,7 @@ include ':app'
59 59
 + project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir,' ../node_modules/react-native-fetch-blob/android')                        
60 60
 ```
61 61
 
62
-Add this code to `MainApplication.java`
62
+Add this line to `MainApplication.java`, so that RNFetchBlob package becomes part of react native package.
63 63
 
64 64
 ```diff
65 65
 ...
@@ -113,9 +113,22 @@ Beginning in Android 6.0 (API level 23), users grant permissions to apps while t
113 113
 
114 114
 ## Recipes
115 115
 
116
+ES6
117
+
118
+The module uses ES6 style export statement, simply use `import` to load the module.
119
+
116 120
 ```js
117 121
 import RNFetchBlob from 'react-native-fetch-blob'
118 122
 ```
123
+
124
+ES5
125
+
126
+If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
127
+
128
+```
129
+var RNFetchBlob = require('react-native-fetch-blob').default
130
+```
131
+
119 132
 #### Download example : Fetch files that needs authorization token
120 133
 
121 134
 ```js
@@ -603,6 +616,7 @@ RNFetchBlob.config({
603 616
 
604 617
 | Version | |
605 618
 |---|---|
619
+| 0.7.2 | Fix cancel request bug |
606 620
 | 0.7.1 | Fix #57 ios module could not compile on ios version <= 9.3 |
607 621
 | 0.7.0 | Add support of Android upload progress, and remove AsyncHttpClient dependency from Android native implementation. |
608 622
 | 0.6.4 | Fix rnpm link script. |

Binārs
img/issue_57_1.png Parādīt failu


Binārs
img/issue_57_2.png Parādīt failu


Binārs
img/issue_57_3.png Parādīt failu


+ 27
- 5
src/README.md Parādīt failu

@@ -1,6 +1,6 @@
1
-# react-native-fetch-blob [![release](https://img.shields.io/github/release/wkh237/react-native-fetch-blob.svg?maxAge=86400&style=flat-square)](https://www.npmjs.com/package/react-native-fetch-blob) [![npm](https://img.shields.io/npm/v/react-native-fetch-blob.svg?style=flat-square)](https://www.npmjs.com/package/react-native-fetch-blob) ![](https://img.shields.io/badge/PR-Welcome-brightgreen.svg?style=flat-square) [![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000&style=flat-square)]() [![npm](https://img.shields.io/badge/inProgress-0.7.0-yellow.svg?style=flat-square)](https://github.com/wkh237/react-native-fetch-blob/milestones)
1
+# react-native-fetch-blob [![release](https://img.shields.io/github/release/wkh237/react-native-fetch-blob.svg?maxAge=86400&style=flat-square)](https://www.npmjs.com/package/react-native-fetch-blob) [![npm](https://img.shields.io/npm/v/react-native-fetch-blob.svg?style=flat-square)](https://www.npmjs.com/package/react-native-fetch-blob) ![](https://img.shields.io/badge/PR-Welcome-brightgreen.svg?style=flat-square) [![npm](https://img.shields.io/npm/l/express.svg?maxAge=2592000&style=flat-square)]()
2 2
 
3
-A module provides upload, download, and files access API. Supports file stream read/write for process large files.
3
+A project committed to make file acess and transfer easier and effiecient for React Native developers.
4 4
 
5 5
 ## [Please check our github for updated document](https://github.com/wkh237/react-native-fetch-blob)
6 6
 
@@ -49,11 +49,19 @@ Link package using [rnpm](https://github.com/rnpm/rnpm)
49 49
 rnpm link
50 50
 ```
51 51
 
52
-### For React Native >= 0.29.0 (Android)
52
+### Manually link the package (Android)
53 53
 
54
-> If you're using react-native >= `0.29.0`, the package might not be able to link through `rnpm link`, and you might see an error screen similar to [#51](https://github.com/wkh237/react-native-fetch-blob/issues/51), this is because a [a bug in 0.29.0](https://github.com/facebook/react-native/commit/4dabb575b1b311ba541fae7eabbd49f08b5391b3), someone has already fixed it, but the solution does not work on our project, you may have to manually add the package yourself.
54
+If rnpm link command failed to link the package automatically, you might try manually link the package.
55 55
 
56
-Add this code to `MainApplication.java`
56
+Open `android/settings.gradle`, and add these lines which will app RNFetchBlob Android project dependency to your app.
57
+
58
+```diff
59
+include ':app'      
60
++ include ':react-native-fetch-blob'                                                                                                  
61
++ project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir,' ../node_modules/react-native-fetch-blob/android')                        
62
+```
63
+
64
+Add this line to `MainApplication.java`, so that RNFetchBlob package becomes part of react native package.
57 65
 
58 66
 ```diff
59 67
 ...
@@ -107,9 +115,22 @@ Beginning in Android 6.0 (API level 23), users grant permissions to apps while t
107 115
 
108 116
 ## Recipes
109 117
 
118
+ES6
119
+
120
+The module uses ES6 style export statement, simply use `import` to load the module.
121
+
110 122
 ```js
111 123
 import RNFetchBlob from 'react-native-fetch-blob'
112 124
 ```
125
+
126
+ES5
127
+
128
+If you're using ES5 require statement to load the module, please add `default`. See [here](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting#rnfetchblobfetch-is-not-a-function) for more detail.
129
+
130
+```
131
+var RNFetchBlob = require('react-native-fetch-blob').default
132
+```
133
+
113 134
 #### Download example : Fetch files that needs authorization token
114 135
 
115 136
 ```js
@@ -597,6 +618,7 @@ RNFetchBlob.config({
597 618
 
598 619
 | Version | |
599 620
 |---|---|
621
+| 0.7.2 | Fix cancel request bug |
600 622
 | 0.7.1 | Fix #57 ios module could not compile on ios version <= 9.3 |
601 623
 | 0.7.0 | Add support of Android upload progress, and remove AsyncHttpClient dependency from Android native implementation. |
602 624
 | 0.6.4 | Fix rnpm link script. |