Skip to content

Commit f06b5dc

Browse files
authored
Merge pull request #141 from mockingbot/update-ssziparchive
update ssziparchive
2 parents ca8eb00 + cda8099 commit f06b5dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+14039
-11041
lines changed

RNZipArchive.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Pod::Spec.new do |s|
2222
ss.public_header_files = ['ios/RNZipArchive.h']
2323
end
2424

25-
s.subspec 'RNZASSZipArchive' do |ss|
25+
s.subspec 'SSZipArchive' do |ss|
2626
ss.source_files = 'ios/SSZipArchive/*.{h,m}', 'ios/SSZipArchive/aes/*.{h,c}', 'ios/SSZipArchive/minizip/*.{h,c}'
2727
ss.private_header_files = 'ios/SSZipArchive/*.h', 'ios/SSZipArchive/aes/*.h', 'ios/SSZipArchive/minizip/*.h'
2828
end

example/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ android {
137137
}
138138

139139
dependencies {
140-
implementation project(':react-native-custom-tabs')
141140
implementation project(':react-native-zip-archive')
141+
implementation project(':react-native-custom-tabs')
142142
implementation project(':react-native-fs')
143143
implementation project(':react-native-document-picker')
144144
implementation fileTree(dir: "libs", include: ["*.jar"])

example/android/app/src/main/java/com/example/MainApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import android.app.Application;
44

55
import com.facebook.react.ReactApplication;
6-
import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage;
76
import com.rnziparchive.RNZipArchivePackage;
7+
import com.github.droibit.android.reactnative.customtabs.CustomTabsPackage;
88
import com.rnfs.RNFSPackage;
99
import com.reactnativedocumentpicker.ReactNativeDocumentPicker;
1010
import com.facebook.react.ReactNativeHost;
@@ -27,8 +27,8 @@ public boolean getUseDeveloperSupport() {
2727
protected List<ReactPackage> getPackages() {
2828
return Arrays.<ReactPackage>asList(
2929
new MainReactPackage(),
30-
new CustomTabsPackage(),
3130
new RNZipArchivePackage(),
31+
new CustomTabsPackage(),
3232
new RNFSPackage(),
3333
new ReactNativeDocumentPicker()
3434
);

example/android/settings.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
rootProject.name = 'example'
2-
include ':react-native-custom-tabs'
3-
project(':react-native-custom-tabs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-custom-tabs/android')
42
include ':react-native-zip-archive'
53
project(':react-native-zip-archive').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-zip-archive/android')
4+
include ':react-native-custom-tabs'
5+
project(':react-native-custom-tabs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-custom-tabs/android')
66
include ':react-native-fs'
77
project(':react-native-fs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fs/android')
88
include ':react-native-document-picker'

example/ios/example-tvOS/Info.plist

Lines changed: 0 additions & 54 deletions
This file was deleted.

example/ios/example.xcodeproj/project.pbxproj

Lines changed: 92 additions & 51 deletions
Large diffs are not rendered by default.

ios/Config.xcconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//
2+
// Config.xcconfig
3+
// RNZipArchive
4+
//
5+
// Created by Pan Rui on 2019/6/18.
6+
// Copyright © 2019 plrthink. All rights reserved.
7+
//
8+
9+
// Configuration settings file format documentation can be found at:
10+
// https://help.apple.com/xcode/#/dev745c5c974
11+
GCC_PREPROCESSOR_DEFINITIONS = HAVE_INTTYPES_H HAVE_PKCRYPT HAVE_STDINT_H HAVE_WZAES HAVE_ZLIB MZ_ZIP_NO_SIGNING $(inherited)

ios/RNZipArchive.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#else
1313
#import "RCTBridgeModule.h"
1414
#endif
15-
#import "SSZipArchive/RNZASSZipArchive.h"
15+
#import "SSZipArchive/SSZipArchive.h"
1616

17-
@interface RNZipArchive : NSObject<RCTBridgeModule, RNZASSZipArchiveDelegate>
17+
@interface RNZipArchive : NSObject<RCTBridgeModule, SSZipArchiveDelegate>
1818

1919
@end

ios/RNZipArchive.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ @implementation RNZipArchive
2525
resolver:(RCTPromiseResolveBlock)resolve
2626
rejecter:(RCTPromiseRejectBlock)reject) {
2727

28-
BOOL isPasswordProtected = [RNZASSZipArchive isFilePasswordProtectedAtPath:file];
28+
BOOL isPasswordProtected = [SSZipArchive isFilePasswordProtectedAtPath:file];
2929
resolve([NSNumber numberWithBool:isPasswordProtected]);
3030
}
3131

@@ -36,7 +36,7 @@ @implementation RNZipArchive
3636

3737
[self zipArchiveProgressEvent:0 total:1 filePath:from]; // force 0%
3838

39-
BOOL success = [RNZASSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:nil error:nil delegate:self];
39+
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:nil error:nil delegate:self];
4040

4141
[self zipArchiveProgressEvent:1 total:1 filePath:from]; // force 100%
4242

@@ -56,7 +56,7 @@ @implementation RNZipArchive
5656

5757
[self zipArchiveProgressEvent:0 total:1 filePath:from]; // force 0%
5858

59-
BOOL success = [RNZASSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:password error:nil delegate:self];
59+
BOOL success = [SSZipArchive unzipFileAtPath:from toDestination:destinationPath overwrite:YES password:password error:nil delegate:self];
6060

6161
[self zipArchiveProgressEvent:1 total:1 filePath:from]; // force 100%
6262

@@ -80,9 +80,9 @@ @implementation RNZipArchive
8080
BOOL success;
8181
[fileManager fileExistsAtPath:from isDirectory:&isDir];
8282
if (isDir) {
83-
success = [RNZASSZipArchive createZipFileAtPath:destinationPath withContentsOfDirectory:from];
83+
success = [SSZipArchive createZipFileAtPath:destinationPath withContentsOfDirectory:from];
8484
} else {
85-
success = [RNZASSZipArchive createZipFileAtPath:destinationPath withFilesAtPaths:@[from]];
85+
success = [SSZipArchive createZipFileAtPath:destinationPath withFilesAtPaths:@[from]];
8686
}
8787

8888
[self zipArchiveProgressEvent:1 total:1 filePath:destinationPath]; // force 100%

0 commit comments

Comments
 (0)