diff --git a/Zip.xcodeproj/project.pbxproj b/Zip.xcodeproj/project.pbxproj index 163d7032b1eeada194ec9eb6840010f8a5e5dbd5..a981dccf1e5c1df4b4d2ec2dc40d22813b4d9b5e 100644 --- a/Zip.xcodeproj/project.pbxproj +++ b/Zip.xcodeproj/project.pbxproj @@ -8,12 +8,43 @@ /* Begin PBXBuildFile section */ 3430F5D61C45B7FB007473A6 /* ZipHelpers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430F5D51C45B7FB007473A6 /* ZipHelpers.swift */; }; + 3430F6201C45C805007473A6 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 3430F61F1C45C805007473A6 /* libz.tbd */; }; + 3430F62D1C45C851007473A6 /* crypt.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6221C45C851007473A6 /* crypt.h */; }; + 3430F62E1C45C851007473A6 /* include.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6231C45C851007473A6 /* include.h */; }; + 3430F62F1C45C851007473A6 /* ioapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6241C45C851007473A6 /* ioapi.c */; }; + 3430F6301C45C851007473A6 /* ioapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6251C45C851007473A6 /* ioapi.h */; }; + 3430F6311C45C851007473A6 /* mztools.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6271C45C851007473A6 /* mztools.c */; }; + 3430F6321C45C851007473A6 /* mztools.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6281C45C851007473A6 /* mztools.h */; }; + 3430F6331C45C851007473A6 /* unzip.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6291C45C851007473A6 /* unzip.c */; }; + 3430F6341C45C851007473A6 /* unzip.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F62A1C45C851007473A6 /* unzip.h */; }; + 3430F6351C45C851007473A6 /* zip.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F62B1C45C851007473A6 /* zip.c */; }; + 3430F6361C45C851007473A6 /* zip.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F62C1C45C851007473A6 /* zip.h */; }; + 3430F6381C45C89A007473A6 /* Common.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6371C45C89A007473A6 /* Common.h */; }; + 3430F64F1C45C8AD007473A6 /* aes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F63A1C45C8AD007473A6 /* aes.h */; }; + 3430F6501C45C8AD007473A6 /* aes_via_ace.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F63B1C45C8AD007473A6 /* aes_via_ace.h */; }; + 3430F6511C45C8AD007473A6 /* aescrypt.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F63C1C45C8AD007473A6 /* aescrypt.c */; }; + 3430F6521C45C8AD007473A6 /* aeskey.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F63D1C45C8AD007473A6 /* aeskey.c */; }; + 3430F6531C45C8AD007473A6 /* aesopt.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F63E1C45C8AD007473A6 /* aesopt.h */; }; + 3430F6541C45C8AD007473A6 /* aestab.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F63F1C45C8AD007473A6 /* aestab.c */; }; + 3430F6551C45C8AD007473A6 /* aestab.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6401C45C8AD007473A6 /* aestab.h */; }; + 3430F6561C45C8AD007473A6 /* brg_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6411C45C8AD007473A6 /* brg_endian.h */; }; + 3430F6571C45C8AD007473A6 /* brg_types.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6421C45C8AD007473A6 /* brg_types.h */; }; + 3430F6581C45C8AD007473A6 /* entropy.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6431C45C8AD007473A6 /* entropy.c */; }; + 3430F6591C45C8AD007473A6 /* entropy.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6441C45C8AD007473A6 /* entropy.h */; }; + 3430F65A1C45C8AD007473A6 /* fileenc.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6451C45C8AD007473A6 /* fileenc.c */; }; + 3430F65B1C45C8AD007473A6 /* fileenc.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6461C45C8AD007473A6 /* fileenc.h */; }; + 3430F65C1C45C8AD007473A6 /* hmac.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6471C45C8AD007473A6 /* hmac.c */; }; + 3430F65D1C45C8AD007473A6 /* hmac.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F6481C45C8AD007473A6 /* hmac.h */; }; + 3430F65E1C45C8AD007473A6 /* prng.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6491C45C8AD007473A6 /* prng.c */; }; + 3430F65F1C45C8AD007473A6 /* prng.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F64A1C45C8AD007473A6 /* prng.h */; }; + 3430F6601C45C8AD007473A6 /* pwd2key.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F64B1C45C8AD007473A6 /* pwd2key.c */; }; + 3430F6611C45C8AD007473A6 /* pwd2key.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F64C1C45C8AD007473A6 /* pwd2key.h */; }; + 3430F6621C45C8AD007473A6 /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = 3430F64D1C45C8AD007473A6 /* sha1.c */; }; + 3430F6631C45C8AD007473A6 /* sha1.h in Headers */ = {isa = PBXBuildFile; fileRef = 3430F64E1C45C8AD007473A6 /* sha1.h */; }; 347E3A781C1DFFB500A11FD3 /* Zip.h in Headers */ = {isa = PBXBuildFile; fileRef = 347E3A771C1DFFB500A11FD3 /* Zip.h */; settings = {ATTRIBUTES = (Public, ); }; }; 347E3A7F1C1DFFB500A11FD3 /* Zip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 347E3A741C1DFFB500A11FD3 /* Zip.framework */; }; 347E3A841C1DFFB500A11FD3 /* ZipTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347E3A831C1DFFB500A11FD3 /* ZipTests.swift */; }; 347E3AD81C1E04C900A11FD3 /* Zip.swift in Sources */ = {isa = PBXBuildFile; fileRef = 347E3AD71C1E04C900A11FD3 /* Zip.swift */; }; - 347E3B1F1C1E1CB500A11FD3 /* libz.1.2.5.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 347E3B1E1C1E1CB500A11FD3 /* libz.1.2.5.tbd */; }; - 347E3B6B1C1E24D300A11FD3 /* minizip in Resources */ = {isa = PBXBuildFile; fileRef = 347E3B6A1C1E24D300A11FD3 /* minizip */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -28,6 +59,40 @@ /* Begin PBXFileReference section */ 3430F5D51C45B7FB007473A6 /* ZipHelpers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ZipHelpers.swift; sourceTree = ""; }; + 3430F61F1C45C805007473A6 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 3430F6221C45C851007473A6 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crypt.h; sourceTree = ""; }; + 3430F6231C45C851007473A6 /* include.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = include.h; sourceTree = ""; }; + 3430F6241C45C851007473A6 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = ioapi.c; sourceTree = ""; }; + 3430F6251C45C851007473A6 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ioapi.h; sourceTree = ""; }; + 3430F6261C45C851007473A6 /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = ""; }; + 3430F6271C45C851007473A6 /* mztools.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = mztools.c; sourceTree = ""; }; + 3430F6281C45C851007473A6 /* mztools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mztools.h; sourceTree = ""; }; + 3430F6291C45C851007473A6 /* unzip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = unzip.c; sourceTree = ""; }; + 3430F62A1C45C851007473A6 /* unzip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unzip.h; sourceTree = ""; }; + 3430F62B1C45C851007473A6 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = zip.c; sourceTree = ""; }; + 3430F62C1C45C851007473A6 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zip.h; sourceTree = ""; }; + 3430F6371C45C89A007473A6 /* Common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Common.h; sourceTree = ""; }; + 3430F63A1C45C8AD007473A6 /* aes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes.h; sourceTree = ""; }; + 3430F63B1C45C8AD007473A6 /* aes_via_ace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aes_via_ace.h; sourceTree = ""; }; + 3430F63C1C45C8AD007473A6 /* aescrypt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aescrypt.c; sourceTree = ""; }; + 3430F63D1C45C8AD007473A6 /* aeskey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aeskey.c; sourceTree = ""; }; + 3430F63E1C45C8AD007473A6 /* aesopt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aesopt.h; sourceTree = ""; }; + 3430F63F1C45C8AD007473A6 /* aestab.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = aestab.c; sourceTree = ""; }; + 3430F6401C45C8AD007473A6 /* aestab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aestab.h; sourceTree = ""; }; + 3430F6411C45C8AD007473A6 /* brg_endian.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = brg_endian.h; sourceTree = ""; }; + 3430F6421C45C8AD007473A6 /* brg_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = brg_types.h; sourceTree = ""; }; + 3430F6431C45C8AD007473A6 /* entropy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = entropy.c; sourceTree = ""; }; + 3430F6441C45C8AD007473A6 /* entropy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = entropy.h; sourceTree = ""; }; + 3430F6451C45C8AD007473A6 /* fileenc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fileenc.c; sourceTree = ""; }; + 3430F6461C45C8AD007473A6 /* fileenc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fileenc.h; sourceTree = ""; }; + 3430F6471C45C8AD007473A6 /* hmac.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = hmac.c; sourceTree = ""; }; + 3430F6481C45C8AD007473A6 /* hmac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hmac.h; sourceTree = ""; }; + 3430F6491C45C8AD007473A6 /* prng.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = prng.c; sourceTree = ""; }; + 3430F64A1C45C8AD007473A6 /* prng.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = prng.h; sourceTree = ""; }; + 3430F64B1C45C8AD007473A6 /* pwd2key.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pwd2key.c; sourceTree = ""; }; + 3430F64C1C45C8AD007473A6 /* pwd2key.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pwd2key.h; sourceTree = ""; }; + 3430F64D1C45C8AD007473A6 /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sha1.c; sourceTree = ""; }; + 3430F64E1C45C8AD007473A6 /* sha1.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sha1.h; sourceTree = ""; }; 347E3A741C1DFFB500A11FD3 /* Zip.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Zip.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 347E3A771C1DFFB500A11FD3 /* Zip.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Zip.h; sourceTree = ""; }; 347E3A791C1DFFB500A11FD3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -36,7 +101,6 @@ 347E3A851C1DFFB500A11FD3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 347E3AD71C1E04C900A11FD3 /* Zip.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Zip.swift; sourceTree = ""; }; 347E3B1E1C1E1CB500A11FD3 /* libz.1.2.5.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.1.2.5.tbd; path = usr/lib/libz.1.2.5.tbd; sourceTree = SDKROOT; }; - 347E3B6A1C1E24D300A11FD3 /* minizip */ = {isa = PBXFileReference; lastKnownFileType = folder; path = minizip; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -44,7 +108,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 347E3B1F1C1E1CB500A11FD3 /* libz.1.2.5.tbd in Frameworks */, + 3430F6201C45C805007473A6 /* libz.tbd in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -59,9 +123,57 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3430F6211C45C83F007473A6 /* minizip */ = { + isa = PBXGroup; + children = ( + 3430F6371C45C89A007473A6 /* Common.h */, + 3430F6221C45C851007473A6 /* crypt.h */, + 3430F6231C45C851007473A6 /* include.h */, + 3430F6241C45C851007473A6 /* ioapi.c */, + 3430F6251C45C851007473A6 /* ioapi.h */, + 3430F6261C45C851007473A6 /* module.modulemap */, + 3430F6271C45C851007473A6 /* mztools.c */, + 3430F6281C45C851007473A6 /* mztools.h */, + 3430F6291C45C851007473A6 /* unzip.c */, + 3430F62A1C45C851007473A6 /* unzip.h */, + 3430F62B1C45C851007473A6 /* zip.c */, + 3430F62C1C45C851007473A6 /* zip.h */, + ); + path = minizip; + sourceTree = ""; + }; + 3430F6391C45C8AD007473A6 /* aes */ = { + isa = PBXGroup; + children = ( + 3430F63A1C45C8AD007473A6 /* aes.h */, + 3430F63B1C45C8AD007473A6 /* aes_via_ace.h */, + 3430F63C1C45C8AD007473A6 /* aescrypt.c */, + 3430F63D1C45C8AD007473A6 /* aeskey.c */, + 3430F63E1C45C8AD007473A6 /* aesopt.h */, + 3430F63F1C45C8AD007473A6 /* aestab.c */, + 3430F6401C45C8AD007473A6 /* aestab.h */, + 3430F6411C45C8AD007473A6 /* brg_endian.h */, + 3430F6421C45C8AD007473A6 /* brg_types.h */, + 3430F6431C45C8AD007473A6 /* entropy.c */, + 3430F6441C45C8AD007473A6 /* entropy.h */, + 3430F6451C45C8AD007473A6 /* fileenc.c */, + 3430F6461C45C8AD007473A6 /* fileenc.h */, + 3430F6471C45C8AD007473A6 /* hmac.c */, + 3430F6481C45C8AD007473A6 /* hmac.h */, + 3430F6491C45C8AD007473A6 /* prng.c */, + 3430F64A1C45C8AD007473A6 /* prng.h */, + 3430F64B1C45C8AD007473A6 /* pwd2key.c */, + 3430F64C1C45C8AD007473A6 /* pwd2key.h */, + 3430F64D1C45C8AD007473A6 /* sha1.c */, + 3430F64E1C45C8AD007473A6 /* sha1.h */, + ); + path = aes; + sourceTree = ""; + }; 347E3A6A1C1DFFB500A11FD3 = { isa = PBXGroup; children = ( + 3430F61F1C45C805007473A6 /* libz.tbd */, 347E3A761C1DFFB500A11FD3 /* Zip */, 347E3A821C1DFFB500A11FD3 /* ZipTests */, 347E3A751C1DFFB500A11FD3 /* Products */, @@ -80,7 +192,8 @@ 347E3A761C1DFFB500A11FD3 /* Zip */ = { isa = PBXGroup; children = ( - 347E3B6A1C1E24D300A11FD3 /* minizip */, + 3430F6391C45C8AD007473A6 /* aes */, + 3430F6211C45C83F007473A6 /* minizip */, 347E3B1E1C1E1CB500A11FD3 /* libz.1.2.5.tbd */, 347E3A771C1DFFB500A11FD3 /* Zip.h */, 347E3A791C1DFFB500A11FD3 /* Info.plist */, @@ -106,7 +219,26 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 3430F65D1C45C8AD007473A6 /* hmac.h in Headers */, + 3430F65F1C45C8AD007473A6 /* prng.h in Headers */, + 3430F6561C45C8AD007473A6 /* brg_endian.h in Headers */, 347E3A781C1DFFB500A11FD3 /* Zip.h in Headers */, + 3430F6361C45C851007473A6 /* zip.h in Headers */, + 3430F6631C45C8AD007473A6 /* sha1.h in Headers */, + 3430F6551C45C8AD007473A6 /* aestab.h in Headers */, + 3430F62D1C45C851007473A6 /* crypt.h in Headers */, + 3430F65B1C45C8AD007473A6 /* fileenc.h in Headers */, + 3430F62E1C45C851007473A6 /* include.h in Headers */, + 3430F6341C45C851007473A6 /* unzip.h in Headers */, + 3430F6531C45C8AD007473A6 /* aesopt.h in Headers */, + 3430F6591C45C8AD007473A6 /* entropy.h in Headers */, + 3430F6301C45C851007473A6 /* ioapi.h in Headers */, + 3430F64F1C45C8AD007473A6 /* aes.h in Headers */, + 3430F6501C45C8AD007473A6 /* aes_via_ace.h in Headers */, + 3430F6611C45C8AD007473A6 /* pwd2key.h in Headers */, + 3430F6321C45C851007473A6 /* mztools.h in Headers */, + 3430F6571C45C8AD007473A6 /* brg_types.h in Headers */, + 3430F6381C45C89A007473A6 /* Common.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -190,7 +322,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 347E3B6B1C1E24D300A11FD3 /* minizip in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -208,8 +339,21 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3430F6621C45C8AD007473A6 /* sha1.c in Sources */, + 3430F65E1C45C8AD007473A6 /* prng.c in Sources */, + 3430F65C1C45C8AD007473A6 /* hmac.c in Sources */, + 3430F62F1C45C851007473A6 /* ioapi.c in Sources */, + 3430F6331C45C851007473A6 /* unzip.c in Sources */, 347E3AD81C1E04C900A11FD3 /* Zip.swift in Sources */, + 3430F6581C45C8AD007473A6 /* entropy.c in Sources */, + 3430F6521C45C8AD007473A6 /* aeskey.c in Sources */, + 3430F6541C45C8AD007473A6 /* aestab.c in Sources */, + 3430F6351C45C851007473A6 /* zip.c in Sources */, + 3430F6311C45C851007473A6 /* mztools.c in Sources */, + 3430F6511C45C8AD007473A6 /* aescrypt.c in Sources */, 3430F5D61C45B7FB007473A6 /* ZipHelpers.swift in Sources */, + 3430F6601C45C8AD007473A6 /* pwd2key.c in Sources */, + 3430F65A1C45C8AD007473A6 /* fileenc.c in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -340,7 +484,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.Zip; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_INCLUDE_PATHS = "${SRCROOT}/zlib/** ${SRCROOT}/minizip/**"; + SWIFT_INCLUDE_PATHS = "${SRCROOT}/zlib/** ${SRCROOT}/Zip/minizip/**"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; }; name = Debug; @@ -364,7 +508,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.Zip; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_INCLUDE_PATHS = "${SRCROOT}/zlib/** ${SRCROOT}/minizip/**"; + SWIFT_INCLUDE_PATHS = "${SRCROOT}/zlib/** ${SRCROOT}/Zip/minizip/**"; }; name = Release; }; diff --git a/Zip/Zip.swift b/Zip/Zip.swift index 00ea3ad99601234b4bd0581f1420dd44d88b4a8b..59cc2e500d51858f40684eb63004b618bae56cb4 100644 --- a/Zip/Zip.swift +++ b/Zip/Zip.swift @@ -25,12 +25,12 @@ public enum ZipError: ErrorType { public class Zip { + public init () { + + } + public func unzipFile(path: String, destination: String, overwrite: Bool, password: String?) throws { - guard let zip: zipFile = unzOpen(path) else { - throw ZipError.UnzipError - } - let fileAttributes = try NSFileManager.defaultManager().attributesOfItemAtPath(path) - let fileSize = fileAttributes[NSFileSize] + let zip = unzOpen(path) var currentPosition = 0.0 var globalInfo: unz_global_info = unz_global_info(number_entry: 0, number_disk_with_CD: 0, size_comment: 0) unzGetGlobalInfo(zip, &globalInfo) @@ -38,14 +38,12 @@ public class Zip { if unzGoToFirstFile(zip) != UNZ_OK { throw ZipError.UnzipError } - let canceled = false var ret: Int32 = 0 var crc_ret: Int32 = 0 let bufferSize = 4096 var buffer = Array(count: bufferSize, repeatedValue: 0) let fileManager = NSFileManager.defaultManager() - var directoriesModificationDates = NSMutableSet() if let password = password where password.characters.count > 0 { ret = unzOpenCurrentFilePassword(zip, password.cStringUsingEncoding(NSASCIIStringEncoding)!) } diff --git a/minizip/aes.h b/Zip/aes/aes.h similarity index 100% rename from minizip/aes.h rename to Zip/aes/aes.h diff --git a/minizip/aes_via_ace.h b/Zip/aes/aes_via_ace.h similarity index 100% rename from minizip/aes_via_ace.h rename to Zip/aes/aes_via_ace.h diff --git a/minizip/aescrypt.c b/Zip/aes/aescrypt.c similarity index 100% rename from minizip/aescrypt.c rename to Zip/aes/aescrypt.c diff --git a/minizip/aeskey.c b/Zip/aes/aeskey.c similarity index 100% rename from minizip/aeskey.c rename to Zip/aes/aeskey.c diff --git a/minizip/aesopt.h b/Zip/aes/aesopt.h similarity index 100% rename from minizip/aesopt.h rename to Zip/aes/aesopt.h diff --git a/minizip/aestab.c b/Zip/aes/aestab.c similarity index 100% rename from minizip/aestab.c rename to Zip/aes/aestab.c diff --git a/minizip/aestab.h b/Zip/aes/aestab.h similarity index 100% rename from minizip/aestab.h rename to Zip/aes/aestab.h diff --git a/minizip/brg_endian.h b/Zip/aes/brg_endian.h similarity index 100% rename from minizip/brg_endian.h rename to Zip/aes/brg_endian.h diff --git a/minizip/brg_types.h b/Zip/aes/brg_types.h similarity index 100% rename from minizip/brg_types.h rename to Zip/aes/brg_types.h diff --git a/minizip/entropy.c b/Zip/aes/entropy.c similarity index 100% rename from minizip/entropy.c rename to Zip/aes/entropy.c diff --git a/minizip/entropy.h b/Zip/aes/entropy.h similarity index 100% rename from minizip/entropy.h rename to Zip/aes/entropy.h diff --git a/minizip/fileenc.c b/Zip/aes/fileenc.c similarity index 100% rename from minizip/fileenc.c rename to Zip/aes/fileenc.c diff --git a/minizip/fileenc.h b/Zip/aes/fileenc.h similarity index 100% rename from minizip/fileenc.h rename to Zip/aes/fileenc.h diff --git a/minizip/hmac.c b/Zip/aes/hmac.c similarity index 100% rename from minizip/hmac.c rename to Zip/aes/hmac.c diff --git a/minizip/hmac.h b/Zip/aes/hmac.h similarity index 100% rename from minizip/hmac.h rename to Zip/aes/hmac.h diff --git a/minizip/prng.c b/Zip/aes/prng.c similarity index 100% rename from minizip/prng.c rename to Zip/aes/prng.c diff --git a/minizip/prng.h b/Zip/aes/prng.h similarity index 100% rename from minizip/prng.h rename to Zip/aes/prng.h diff --git a/minizip/pwd2key.c b/Zip/aes/pwd2key.c similarity index 100% rename from minizip/pwd2key.c rename to Zip/aes/pwd2key.c diff --git a/minizip/pwd2key.h b/Zip/aes/pwd2key.h similarity index 100% rename from minizip/pwd2key.h rename to Zip/aes/pwd2key.h diff --git a/minizip/sha1.c b/Zip/aes/sha1.c similarity index 100% rename from minizip/sha1.c rename to Zip/aes/sha1.c diff --git a/minizip/sha1.h b/Zip/aes/sha1.h similarity index 100% rename from minizip/sha1.h rename to Zip/aes/sha1.h diff --git a/minizip/common.h b/Zip/minizip/Common.h similarity index 98% rename from minizip/common.h rename to Zip/minizip/Common.h index fa3d027f77b062c4395184d3429b1fe0796963d9..7a92f1344209f83465fedf8ab8c2f1856edb566f 100755 --- a/minizip/common.h +++ b/Zip/minizip/Common.h @@ -1,5 +1,5 @@ -#ifndef ZipCommon -#define ZipCommon +#ifndef SSZipCommon +#define SSZipCommon /* tm_unz contain date/time info */ typedef struct tm_unz_s diff --git a/minizip/crypt.h b/Zip/minizip/crypt.h similarity index 100% rename from minizip/crypt.h rename to Zip/minizip/crypt.h diff --git a/minizip/include.h b/Zip/minizip/include.h similarity index 100% rename from minizip/include.h rename to Zip/minizip/include.h diff --git a/minizip/ioapi.c b/Zip/minizip/ioapi.c similarity index 100% rename from minizip/ioapi.c rename to Zip/minizip/ioapi.c diff --git a/minizip/ioapi.h b/Zip/minizip/ioapi.h similarity index 100% rename from minizip/ioapi.h rename to Zip/minizip/ioapi.h diff --git a/Zip/minizip/module.modulemap b/Zip/minizip/module.modulemap new file mode 100755 index 0000000000000000000000000000000000000000..45a6e5823de2d3d92d8e16ff65f38dda50b552e9 --- /dev/null +++ b/Zip/minizip/module.modulemap @@ -0,0 +1,5 @@ +module minizip [system][extern_c] { + header "unzip.h" + header "zip.h" + export * +} diff --git a/minizip/mztools.c b/Zip/minizip/mztools.c similarity index 100% rename from minizip/mztools.c rename to Zip/minizip/mztools.c diff --git a/minizip/mztools.h b/Zip/minizip/mztools.h similarity index 100% rename from minizip/mztools.h rename to Zip/minizip/mztools.h diff --git a/minizip/unzip.c b/Zip/minizip/unzip.c similarity index 100% rename from minizip/unzip.c rename to Zip/minizip/unzip.c diff --git a/minizip/unzip.h b/Zip/minizip/unzip.h similarity index 99% rename from minizip/unzip.h rename to Zip/minizip/unzip.h index 58dd0d1ecb6cbbf4c7a32039ee1c003cc4338b01..02c4c58193c186cdfe9e3ebae589d71a9f3cd80f 100755 --- a/minizip/unzip.h +++ b/Zip/minizip/unzip.h @@ -14,7 +14,7 @@ See the accompanying LICENSE file for the full text of the license. */ -#include "common.h" +#include "Common.h" #ifndef _UNZ_H #define _UNZ_H diff --git a/minizip/zip.c b/Zip/minizip/zip.c similarity index 100% rename from minizip/zip.c rename to Zip/minizip/zip.c diff --git a/minizip/zip.h b/Zip/minizip/zip.h similarity index 100% rename from minizip/zip.h rename to Zip/minizip/zip.h diff --git a/examples/Sample/Sample.xcodeproj/project.pbxproj b/examples/Sample/Sample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000000000000000000000000000000000..a5b457d7b58a3f66b2720f39d04e46ab459fa11a --- /dev/null +++ b/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -0,0 +1,486 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 3430F6711C45C930007473A6 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6701C45C930007473A6 /* AppDelegate.swift */; }; + 3430F6731C45C930007473A6 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6721C45C930007473A6 /* ViewController.swift */; }; + 3430F6761C45C930007473A6 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6741C45C930007473A6 /* Main.storyboard */; }; + 3430F6781C45C930007473A6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6771C45C930007473A6 /* Assets.xcassets */; }; + 3430F67B1C45C930007473A6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6791C45C930007473A6 /* LaunchScreen.storyboard */; }; + 3430F6861C45C930007473A6 /* SampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6851C45C930007473A6 /* SampleTests.swift */; }; + 3430F6991C45C949007473A6 /* Zip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3430F6961C45C93F007473A6 /* Zip.framework */; }; + 3430F69A1C45C949007473A6 /* Zip.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3430F6961C45C93F007473A6 /* Zip.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 3430F69F1C45C96A007473A6 /* master.zip in Resources */ = {isa = PBXBuildFile; fileRef = 3430F69E1C45C96A007473A6 /* master.zip */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3430F6821C45C930007473A6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3430F6651C45C930007473A6 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3430F66C1C45C930007473A6; + remoteInfo = Sample; + }; + 3430F6951C45C93F007473A6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3430F6901C45C93F007473A6 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 347E3A741C1DFFB500A11FD3; + remoteInfo = Zip; + }; + 3430F6971C45C93F007473A6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3430F6901C45C93F007473A6 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 347E3A7E1C1DFFB500A11FD3; + remoteInfo = ZipTests; + }; + 3430F69B1C45C949007473A6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3430F6901C45C93F007473A6 /* Zip.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 347E3A731C1DFFB500A11FD3; + remoteInfo = Zip; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 3430F69D1C45C949007473A6 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3430F69A1C45C949007473A6 /* Zip.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 3430F66D1C45C930007473A6 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3430F6701C45C930007473A6 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 3430F6721C45C930007473A6 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + 3430F6751C45C930007473A6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 3430F6771C45C930007473A6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3430F67A1C45C930007473A6 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 3430F67C1C45C930007473A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3430F6811C45C930007473A6 /* SampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3430F6851C45C930007473A6 /* SampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleTests.swift; sourceTree = ""; }; + 3430F6871C45C930007473A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3430F6901C45C93F007473A6 /* Zip.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Zip.xcodeproj; path = ../../Zip.xcodeproj; sourceTree = ""; }; + 3430F69E1C45C96A007473A6 /* master.zip */ = {isa = PBXFileReference; lastKnownFileType = archive.zip; path = master.zip; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3430F66A1C45C930007473A6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 3430F6991C45C949007473A6 /* Zip.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3430F67E1C45C930007473A6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3430F6641C45C930007473A6 = { + isa = PBXGroup; + children = ( + 3430F6901C45C93F007473A6 /* Zip.xcodeproj */, + 3430F66F1C45C930007473A6 /* Sample */, + 3430F6841C45C930007473A6 /* SampleTests */, + 3430F66E1C45C930007473A6 /* Products */, + ); + sourceTree = ""; + }; + 3430F66E1C45C930007473A6 /* Products */ = { + isa = PBXGroup; + children = ( + 3430F66D1C45C930007473A6 /* Sample.app */, + 3430F6811C45C930007473A6 /* SampleTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 3430F66F1C45C930007473A6 /* Sample */ = { + isa = PBXGroup; + children = ( + 3430F6701C45C930007473A6 /* AppDelegate.swift */, + 3430F6721C45C930007473A6 /* ViewController.swift */, + 3430F69E1C45C96A007473A6 /* master.zip */, + 3430F6741C45C930007473A6 /* Main.storyboard */, + 3430F6771C45C930007473A6 /* Assets.xcassets */, + 3430F6791C45C930007473A6 /* LaunchScreen.storyboard */, + 3430F67C1C45C930007473A6 /* Info.plist */, + ); + path = Sample; + sourceTree = ""; + }; + 3430F6841C45C930007473A6 /* SampleTests */ = { + isa = PBXGroup; + children = ( + 3430F6851C45C930007473A6 /* SampleTests.swift */, + 3430F6871C45C930007473A6 /* Info.plist */, + ); + path = SampleTests; + sourceTree = ""; + }; + 3430F6911C45C93F007473A6 /* Products */ = { + isa = PBXGroup; + children = ( + 3430F6961C45C93F007473A6 /* Zip.framework */, + 3430F6981C45C93F007473A6 /* ZipTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3430F66C1C45C930007473A6 /* Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3430F68A1C45C930007473A6 /* Build configuration list for PBXNativeTarget "Sample" */; + buildPhases = ( + 3430F6691C45C930007473A6 /* Sources */, + 3430F66A1C45C930007473A6 /* Frameworks */, + 3430F66B1C45C930007473A6 /* Resources */, + 3430F69D1C45C949007473A6 /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 3430F69C1C45C949007473A6 /* PBXTargetDependency */, + ); + name = Sample; + productName = Sample; + productReference = 3430F66D1C45C930007473A6 /* Sample.app */; + productType = "com.apple.product-type.application"; + }; + 3430F6801C45C930007473A6 /* SampleTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3430F68D1C45C930007473A6 /* Build configuration list for PBXNativeTarget "SampleTests" */; + buildPhases = ( + 3430F67D1C45C930007473A6 /* Sources */, + 3430F67E1C45C930007473A6 /* Frameworks */, + 3430F67F1C45C930007473A6 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3430F6831C45C930007473A6 /* PBXTargetDependency */, + ); + name = SampleTests; + productName = SampleTests; + productReference = 3430F6811C45C930007473A6 /* SampleTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3430F6651C45C930007473A6 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0720; + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = "Roy Marmelstein"; + TargetAttributes = { + 3430F66C1C45C930007473A6 = { + CreatedOnToolsVersion = 7.2; + }; + 3430F6801C45C930007473A6 = { + CreatedOnToolsVersion = 7.2; + TestTargetID = 3430F66C1C45C930007473A6; + }; + }; + }; + buildConfigurationList = 3430F6681C45C930007473A6 /* Build configuration list for PBXProject "Sample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3430F6641C45C930007473A6; + productRefGroup = 3430F66E1C45C930007473A6 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 3430F6911C45C93F007473A6 /* Products */; + ProjectRef = 3430F6901C45C93F007473A6 /* Zip.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 3430F66C1C45C930007473A6 /* Sample */, + 3430F6801C45C930007473A6 /* SampleTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 3430F6961C45C93F007473A6 /* Zip.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Zip.framework; + remoteRef = 3430F6951C45C93F007473A6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 3430F6981C45C93F007473A6 /* ZipTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = ZipTests.xctest; + remoteRef = 3430F6971C45C93F007473A6 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 3430F66B1C45C930007473A6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3430F67B1C45C930007473A6 /* LaunchScreen.storyboard in Resources */, + 3430F6781C45C930007473A6 /* Assets.xcassets in Resources */, + 3430F6761C45C930007473A6 /* Main.storyboard in Resources */, + 3430F69F1C45C96A007473A6 /* master.zip in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3430F67F1C45C930007473A6 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3430F6691C45C930007473A6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3430F6731C45C930007473A6 /* ViewController.swift in Sources */, + 3430F6711C45C930007473A6 /* AppDelegate.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3430F67D1C45C930007473A6 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3430F6861C45C930007473A6 /* SampleTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3430F6831C45C930007473A6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3430F66C1C45C930007473A6 /* Sample */; + targetProxy = 3430F6821C45C930007473A6 /* PBXContainerItemProxy */; + }; + 3430F69C1C45C949007473A6 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Zip; + targetProxy = 3430F69B1C45C949007473A6 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 3430F6741C45C930007473A6 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3430F6751C45C930007473A6 /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 3430F6791C45C930007473A6 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 3430F67A1C45C930007473A6 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3430F6881C45C930007473A6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 3430F6891C45C930007473A6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.2; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 3430F68B1C45C930007473A6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.Sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 3430F68C1C45C930007473A6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + EMBEDDED_CONTENT_CONTAINS_SWIFT = YES; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.Sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; + 3430F68E1C45C930007473A6 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.SampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"; + }; + name = Debug; + }; + 3430F68F1C45C930007473A6 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = SampleTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.roymarmelstein.SampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3430F6681C45C930007473A6 /* Build configuration list for PBXProject "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3430F6881C45C930007473A6 /* Debug */, + 3430F6891C45C930007473A6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3430F68A1C45C930007473A6 /* Build configuration list for PBXNativeTarget "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3430F68B1C45C930007473A6 /* Debug */, + 3430F68C1C45C930007473A6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; + 3430F68D1C45C930007473A6 /* Build configuration list for PBXNativeTarget "SampleTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3430F68E1C45C930007473A6 /* Debug */, + 3430F68F1C45C930007473A6 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3430F6651C45C930007473A6 /* Project object */; +} diff --git a/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000000000000000000000000000000000..a80c038249587c0ccbc024376cd198dd085201ab --- /dev/null +++ b/examples/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/examples/Sample/Sample/AppDelegate.swift b/examples/Sample/Sample/AppDelegate.swift new file mode 100644 index 0000000000000000000000000000000000000000..da5ce4925c56b12afb07bbdb579507152528325b --- /dev/null +++ b/examples/Sample/Sample/AppDelegate.swift @@ -0,0 +1,46 @@ +// +// AppDelegate.swift +// Sample +// +// Created by Roy Marmelstein on 13/01/2016. +// Copyright © 2016 Roy Marmelstein. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} + diff --git a/examples/Sample/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/Sample/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000000000000000000000000000000000..118c98f7461bf98b2bc7e061150d8021121ad277 --- /dev/null +++ b/examples/Sample/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/Sample/Sample/Base.lproj/LaunchScreen.storyboard b/examples/Sample/Sample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000000000000000000000000000000000..78686cd0750147943119cbb75ad038eb1579fe3f --- /dev/null +++ b/examples/Sample/Sample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Sample/Sample/Base.lproj/Main.storyboard b/examples/Sample/Sample/Base.lproj/Main.storyboard new file mode 100644 index 0000000000000000000000000000000000000000..3a2a49bad8c615d719f891998e537cd29a001ec0 --- /dev/null +++ b/examples/Sample/Sample/Base.lproj/Main.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/Sample/Sample/Info.plist b/examples/Sample/Sample/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..6905cc67bbf738499f2accb4b56f5f1ddc8ce444 --- /dev/null +++ b/examples/Sample/Sample/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/Sample/Sample/ViewController.swift b/examples/Sample/Sample/ViewController.swift new file mode 100644 index 0000000000000000000000000000000000000000..471374e446dee63b6af42240af1f2f80b3ef87e4 --- /dev/null +++ b/examples/Sample/Sample/ViewController.swift @@ -0,0 +1,74 @@ +// +// ViewController.swift +// Sample +// +// Created by Roy Marmelstein on 13/01/2016. +// Copyright © 2016 Roy Marmelstein. All rights reserved. +// + +import UIKit +import Zip + +class ViewController: UIViewController { + + override func viewDidLoad() { + super.viewDidLoad() + do { + let destinationPath = tempUnzipPath()! + let fileAbsoluteUrl = NSBundle.mainBundle().pathForResource("master", ofType: "zip") + let fileManager = NSFileManager.defaultManager() + let fileExists = fileManager.fileExistsAtPath(fileAbsoluteUrl!) + try Zip().unzipFile(fileAbsoluteUrl!, destination: destinationPath, overwrite: true, password: nil) + } + catch { + print("oops") + } + // Do any additional setup after loading the view, typically from a nib. + } + + override func didReceiveMemoryWarning() { + super.didReceiveMemoryWarning() + // Dispose of any resources that can be recreated. + } + + + func tempCopyPath() -> String? { + var path = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)[0] + path += "master.zip" + let url = NSURL(fileURLWithPath: path) + + do { + try NSFileManager.defaultManager().createDirectoryAtURL(url, withIntermediateDirectories: true, attributes: nil) + } catch { + return nil + } + + if let path = url.path { + return path + } + + return nil + } + + + + func tempUnzipPath() -> String? { + var path = NSSearchPathForDirectoriesInDomains(.CachesDirectory, .UserDomainMask, true)[0] + path += "/\(NSUUID().UUIDString)" + let url = NSURL(fileURLWithPath: path) + + do { + try NSFileManager.defaultManager().createDirectoryAtURL(url, withIntermediateDirectories: true, attributes: nil) + } catch { + return nil + } + + if let path = url.path { + return path + } + + return nil + } + +} + diff --git a/examples/Sample/Sample/master.zip b/examples/Sample/Sample/master.zip new file mode 100644 index 0000000000000000000000000000000000000000..96e2d453dd67d621da39661bb46496df30a6db63 Binary files /dev/null and b/examples/Sample/Sample/master.zip differ diff --git a/examples/Sample/SampleTests/Info.plist b/examples/Sample/SampleTests/Info.plist new file mode 100644 index 0000000000000000000000000000000000000000..ba72822e8728ef2951005e49b6c27a2f1da6572d --- /dev/null +++ b/examples/Sample/SampleTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/examples/Sample/SampleTests/SampleTests.swift b/examples/Sample/SampleTests/SampleTests.swift new file mode 100644 index 0000000000000000000000000000000000000000..e2939801ceb5b392aadbd91a8fe2aad64100add2 --- /dev/null +++ b/examples/Sample/SampleTests/SampleTests.swift @@ -0,0 +1,36 @@ +// +// SampleTests.swift +// SampleTests +// +// Created by Roy Marmelstein on 13/01/2016. +// Copyright © 2016 Roy Marmelstein. All rights reserved. +// + +import XCTest +@testable import Sample + +class SampleTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() { + // This is an example of a performance test case. + self.measureBlock { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/minizip/module.modulemap b/minizip/module.modulemap deleted file mode 100755 index 7b7c412bca284b7022c4abc84eba3652c7fbc5fd..0000000000000000000000000000000000000000 --- a/minizip/module.modulemap +++ /dev/null @@ -1,4 +0,0 @@ -module minizip [system] { - header "include.h" - export * -}