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
+33-74Lines changed: 33 additions & 74 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,104 +3,63 @@
3
3
Zip archive utility for react-native
4
4
5
5
> ### Important
6
-
> If you're using react-native after v0.40.0, please install this package via the `next` branch. Issues and PR are welcome to make it into master and released.
6
+
> If you're using react-native after 0.40.0 on iOS, be sure to use > 0.1.0 of this package.
7
7
8
8
## Installation
9
9
10
10
```bash
11
11
npm install react-native-zip-archive --save
12
+
react-native link react-native-zip-archive
12
13
```
13
14
14
-
## Getting started - iOS
15
-
16
-
1. In Xcode, in the project navigator right click `Libraries` ➜ `Add Files to [your project's name]`
17
-
2. Go to `node_modules` ➜ `react-native-zip-archive` and add `RNZipArchive.xcodeproj`
18
-
3. Add `libRNZipArchive.a` (from 'Products' under RNZipArchive.xcodeproj) to your project's `Build Phases` ➜ `Link Binary With Libraries` phase
19
-
4. Add the `libz` library to your target
20
-
5. Look for Header Search Paths and make sure it contains both `$(SRCROOT)/../react-native/React` and `$(SRCROOT)/../../React` - mark both as recursive
21
-
6. Run your project (`CMD+R`)
22
-
23
-
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.
24
-
25
-
## Getting started - Android
26
-
27
-
* Edit `android/settings.gradle` to look like this (without the +):
28
-
29
-
```diff
30
-
rootProject.name = 'MyApp'
31
-
32
-
include ':app'
33
-
34
-
+ include ':react-native-zip-archive'
35
-
+ project(':react-native-zip-archive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zip-archive/android')
36
-
```
37
-
38
-
* Edit `android/app/build.gradle` (note: **app** folder) to look like this:
39
-
40
-
```diff
41
-
apply plugin: 'com.android.application'
42
-
43
-
android {
44
-
...
45
-
}
46
-
47
-
dependencies {
48
-
compile fileTree(dir: 'libs', include: ['*.jar'])
49
-
compile 'com.android.support:appcompat-v7:23.0.0'
50
-
compile 'com.facebook.react:react-native:0.16.+'
51
-
+ compile project(':react-native-zip-archive')
52
-
}
53
-
```
54
-
55
-
* 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