Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,40 +43,12 @@
</config-file>
<header-file src="src/ios/FiNeZeep.h" />
<source-file src="src/ios/FiNeZeep.m" />
<header-file src="src/ios/Common.h" />
<header-file src="src/ios/aes/aes.h" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/aes_via_ace.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/aescrypt.c" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/aeskey.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/aesopt.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/aestab.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/aestab.h" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/brg_endian.h" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/brg_types.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/entropy.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/entropy.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/fileenc.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/fileenc.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/hmac.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/hmac.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/prng.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/prng.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/pwd2key.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/pwd2key.h" target-dir="Plugins/aes" />
<source-file src="src/ios/aes/sha1.c" target-dir="Plugins/aes" />
<header-file src="src/ios/aes/sha1.h" target-dir="Plugins/aes" />
<source-file src="src/ios/SSZipArchive.m" target-dir="Plugins/minizip" />
<header-file src="src/ios/SSZipArchive.h" target-dir="Plugins/minizip" />
<source-file src="src/ios/minizip/zip.c" target-dir="Plugins/minizip" />
<header-file src="src/ios/minizip/zip.h" target-dir="Plugins/minizip" />
<source-file src="src/ios/minizip/unzip.c" target-dir="Plugins/minizip" />
<header-file src="src/ios/minizip/unzip.h" target-dir="Plugins/minizip" />
<source-file src="src/ios/minizip/mztools.c" target-dir="Plugins/minizip" />
<header-file src="src/ios/minizip/mztools.h" target-dir="Plugins/minizip" />
<source-file src="src/ios/minizip/ioapi.c" target-dir="Plugins/minizip" />
<header-file src="src/ios/minizip/ioapi.h" target-dir="Plugins/minizip" />
<header-file src="src/ios/minizip/crypt.h" target-dir="Plugins/minizip" />
<framework src="libz.dylib" />

<podspec>
<pods use-frameworks="true">
<pod name="SSZipArchive"/>
</pods>
</podspec>
</platform>

<!--
Expand Down
81 changes: 0 additions & 81 deletions src/ios/Common.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/ios/FiNeZeep.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import <Foundation/Foundation.h>
#import <Cordova/CDVPlugin.h>
#import "SSZipArchive.h"
#import <SSZipArchive/SSZipArchive.h>

@interface FiNeZeep : CDVPlugin

Expand Down
8 changes: 6 additions & 2 deletions src/ios/FiNeZeep.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ -(void)zip:(CDVInvokedUrlCommand*)command
{
NSString* fromPath = [self pathForURL:[command.arguments objectAtIndex:0]];
NSString* toPath = [self pathForURL:[command.arguments objectAtIndex:1]];
NSString* password = [command.arguments objectAtIndex:2];
password = [password isKindOfClass:[NSString class]] && password.length > 0 ? password : nil;

if([SSZipArchive createZipFileAtPath:toPath withContentsOfDirectory:fromPath keepParentDirectory:NO withPassword:nil])
if([SSZipArchive createZipFileAtPath:toPath withContentsOfDirectory:fromPath keepParentDirectory:NO withPassword:password])
{
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
}
Expand All @@ -67,9 +69,11 @@ -(void)unzip:(CDVInvokedUrlCommand*)command
{
NSString* fromPath = [self pathForURL:[command.arguments objectAtIndex:0]];
NSString* toPath = [self pathForURL:[command.arguments objectAtIndex:1]];
NSString* password = [command.arguments objectAtIndex:2];
password = [password isKindOfClass:[NSString class]] && password.length > 0 ? password : nil;
NSError* error;

if([SSZipArchive unzipFileAtPath:fromPath toDestination:toPath overwrite:YES password:nil error:&error delegate:self])
if([SSZipArchive unzipFileAtPath:fromPath toDestination:toPath overwrite:YES password:password error:&error delegate:self])
{
pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK];
}
Expand Down
77 changes: 0 additions & 77 deletions src/ios/SSZipArchive.h

This file was deleted.

Loading