wkh237 8 лет назад
Родитель
Сommit
e997432968
1 измененных файлов: 7 добавлений и 37 удалений
  1. 7
    37
      README.md

+ 7
- 37
README.md Просмотреть файл

@@ -58,50 +58,20 @@ Link package using [rnpm](https://github.com/rnpm/rnpm)
58 58
 rnpm link
59 59
 ```
60 60
 
61
-Or if using CocoaPods, add the pod to your `Podfile`, for example:
61
+optional, use the following command to add Android permissions to `AndroidManifest.xml` automatically
62 62
 
63
-```
64
-pod 'react-native-fetch-blob,
65
-    :path => '../node_modules/react-native-fetch-blob
63
+```sh
64
+RNFB_ANDROID_PERMISSIONS=true rnpm link
66 65
 ```
67 66
 
68
-### Manually link the package (Android)
69
-
70
-If rnpm link command failed to link the package automatically, you might try manually link the package.
71
-
72
-Open `android/app/build.gradle`, add this line
67
+Or if using CocoaPods, add the pod to your `Podfile`, for example:
73 68
 
74
-```diff
75
-dependencies {
76
-    ...
77
-+    compile project(':react-native-fetch-blob')                                                                      
78
-}
79 69
 ```
80
-
81
-Open `android/settings.gradle`, and add these lines which will app RNFetchBlob Android project dependency to your app.
82
-
83
-```diff
84
-include ':app'      
85
-+ include ':react-native-fetch-blob'                                                                                                  
86
-+ project(':react-native-fetch-blob').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fetch-blob/android')                        
70
+pod 'react-native-fetch-blob,
71
+    :path => '../node_modules/react-native-fetch-blob
87 72
 ```
88 73
 
89
-Add this line to `MainApplication.java`, so that RNFetchBlob package becomes part of react native package.
90
-
91
-```diff
92
-...
93
-+ import com.RNFetchBlob.RNFetchBlobPackage;                                                                                 
94
-...
95
-protected List<ReactPackage> getPackages() {
96
-      return Arrays.<ReactPackage>asList(
97
-          new MainReactPackage(),
98
-+          new RNFetchBlobPackage()                                                                                         
99
-      );
100
-    }
101
-  };
102
-...
103
-```
104
-> If you still having problem on installing this package, please check the [trouble shooting page](https://github.com/wkh237/react-native-fetch-blob/wiki/Trouble-Shooting) or [file an issue](https://github.com/wkh237/react-native-fetch-blob/issues/new)
74
+The link script might not take effect if you have non-default project structure, please visit [the wiki](https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package/_edit) to manually link the pacakge.
105 75
 
106 76
 **Grant Permission to External storage for Android 5.0 or lower**
107 77