You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-73Lines changed: 35 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,102 +2,64 @@
2
2
3
3
Zip archive utility for react-native
4
4
5
+
> ### Important
6
+
> If you're using react-native after 0.40.0 on iOS, be sure to use > 0.1.0 of this package.
7
+
5
8
## Installation
6
9
7
10
```bash
8
11
npm install react-native-zip-archive --save
12
+
react-native link react-native-zip-archive
9
13
```
10
14
11
-
## Getting started - iOS
12
-
13
-
1. In Xcode, in the project navigator right click `Libraries` ➜ `Add Files to [your project's name]`
14
-
2. Go to `node_modules` ➜ `react-native-zip-archive` and add `RNZipArchive.xcodeproj`
15
-
3. Add `libRNZipArchive.a` (from 'Products' under RNZipArchive.xcodeproj) to your project's `Build Phases` ➜ `Link Binary With Libraries` phase
16
-
4. Add the `libz` library to your target
17
-
5. Look for Header Search Paths and make sure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React` - mark both as recursive
18
-
6. Run your project (`CMD+R`)
19
-
20
-
Warning: If you're using [rnpm](https://github.com/rnpm/rnpm) to link this module, you also need manually link `libz` library to your target otherwise your project wouldn't compile.
21
-
22
-
## Getting started - Android
23
-
24
-
* Edit `android/settings.gradle` to look like this (without the +):
25
-
26
-
```diff
27
-
rootProject.name = 'MyApp'
28
-
29
-
include ':app'
30
-
31
-
+ include ':react-native-zip-archive'
32
-
+ project(':react-native-zip-archive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zip-archive/android')
33
-
```
34
-
35
-
* Edit `android/app/build.gradle` (note: **app** folder) to look like this:
36
-
37
-
```diff
38
-
apply plugin: 'com.android.application'
39
-
40
-
android {
41
-
...
42
-
}
43
-
44
-
dependencies {
45
-
compile fileTree(dir: 'libs', include: ['*.jar'])
46
-
compile 'com.android.support:appcompat-v7:23.0.0'
47
-
compile 'com.facebook.react:react-native:0.16.+'
48
-
+ compile project(':react-native-zip-archive')
49
-
}
50
-
```
51
-
52
-
* Edit your `MainActivity.java` (deep in `android/app/src/main/java/...`) to look like this (note **two** places to edit):
you may also want to use something like [react-native-fs](https://github.com/johanneslumpe/react-native-fs) to access the file system (check its repo for more information)
0 commit comments