diff --git a/examples/Sample/Sample.xcodeproj/project.pbxproj b/examples/Sample/Sample.xcodeproj/project.pbxproj index 9af2bc311ea84c3ba5e9947a75bdfda9a64fb98a..3137855a0720ba0bbad1f7b74a9d6878ff2d2299 100644 --- a/examples/Sample/Sample.xcodeproj/project.pbxproj +++ b/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -12,6 +12,8 @@ 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 */; }; + 343EE1B31D71DE1400244997 /* Zip.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 343EE1AA1D71DE0D00244997 /* Zip.framework */; }; + 343EE1B41D71DE1400244997 /* Zip.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 343EE1AA1D71DE0D00244997 /* Zip.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 3467DAED1C4BADB700BA3DB8 /* FileBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3467DAEC1C4BADB700BA3DB8 /* FileBrowser.swift */; }; 3467DAF31C4BF17900BA3DB8 /* Image1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */; }; 3467DAF41C4BF17900BA3DB8 /* Image2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAF01C4BF17900BA3DB8 /* Image2.jpg */; }; @@ -27,6 +29,48 @@ remoteGlobalIDString = 3430F66C1C45C930007473A6; remoteInfo = Sample; }; + 343EE1A91D71DE0D00244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 347E3A741C1DFFB500A11FD3; + remoteInfo = Zip; + }; + 343EE1AB1D71DE0D00244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 347E3A7E1C1DFFB500A11FD3; + remoteInfo = ZipTests; + }; + 343EE1AD1D71DE0D00244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 343F50FF1C8DAEEC0028C434; + remoteInfo = "Zip OSX"; + }; + 343EE1AF1D71DE0D00244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 343F51081C8DAEEC0028C434; + remoteInfo = "Zip OSXTests"; + }; + 343EE1B11D71DE0D00244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 342545B51CE525B200336074; + remoteInfo = "Zip tvOS"; + }; + 343EE1B51D71DE1400244997 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 347E3A731C1DFFB500A11FD3; + remoteInfo = Zip; + }; /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -36,6 +80,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 343EE1B41D71DE1400244997 /* Zip.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -52,6 +97,7 @@ 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 = ""; }; + 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Zip.xcodeproj; path = ../../Zip.xcodeproj; sourceTree = ""; }; 3467DAEC1C4BADB700BA3DB8 /* FileBrowser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileBrowser.swift; sourceTree = ""; }; 3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image1.jpg; sourceTree = ""; }; 3467DAF01C4BF17900BA3DB8 /* Image2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image2.jpg; sourceTree = ""; }; @@ -64,6 +110,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 343EE1B31D71DE1400244997 /* Zip.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -80,6 +127,7 @@ 3430F6641C45C930007473A6 = { isa = PBXGroup; children = ( + 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */, 3430F66F1C45C930007473A6 /* Sample */, 3430F6841C45C930007473A6 /* SampleTests */, 3430F66E1C45C930007473A6 /* Products */, @@ -121,6 +169,18 @@ path = SampleTests; sourceTree = ""; }; + 343EE1A21D71DE0D00244997 /* Products */ = { + isa = PBXGroup; + children = ( + 343EE1AA1D71DE0D00244997 /* Zip.framework */, + 343EE1AC1D71DE0D00244997 /* ZipTests.xctest */, + 343EE1AE1D71DE0D00244997 /* Zip.framework */, + 343EE1B01D71DE0D00244997 /* Zip OSXTests.xctest */, + 343EE1B21D71DE0D00244997 /* Zip.framework */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -136,6 +196,7 @@ buildRules = ( ); dependencies = ( + 343EE1B61D71DE1400244997 /* PBXTargetDependency */, ); name = Sample; productName = Sample; @@ -167,7 +228,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Roy Marmelstein"; TargetAttributes = { 3430F66C1C45C930007473A6 = { @@ -192,6 +253,12 @@ mainGroup = 3430F6641C45C930007473A6; productRefGroup = 3430F66E1C45C930007473A6 /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 343EE1A21D71DE0D00244997 /* Products */; + ProjectRef = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 3430F66C1C45C930007473A6 /* Sample */, @@ -200,6 +267,44 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + 343EE1AA1D71DE0D00244997 /* Zip.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Zip.framework; + remoteRef = 343EE1A91D71DE0D00244997 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 343EE1AC1D71DE0D00244997 /* ZipTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = ZipTests.xctest; + remoteRef = 343EE1AB1D71DE0D00244997 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 343EE1AE1D71DE0D00244997 /* Zip.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Zip.framework; + remoteRef = 343EE1AD1D71DE0D00244997 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 343EE1B01D71DE0D00244997 /* Zip OSXTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "Zip OSXTests.xctest"; + remoteRef = 343EE1AF1D71DE0D00244997 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 343EE1B21D71DE0D00244997 /* Zip.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = Zip.framework; + remoteRef = 343EE1B11D71DE0D00244997 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 3430F66B1C45C930007473A6 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -250,6 +355,11 @@ target = 3430F66C1C45C930007473A6 /* Sample */; targetProxy = 3430F6821C45C930007473A6 /* PBXContainerItemProxy */; }; + 343EE1B61D71DE1400244997 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Zip; + targetProxy = 343EE1B51D71DE1400244997 /* PBXContainerItemProxy */; + }; /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ @@ -285,8 +395,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -329,8 +441,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -349,6 +463,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 9.2; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; VALIDATE_PRODUCT = YES; }; name = Release; @@ -356,6 +471,7 @@ 3430F68B1C45C930007473A6 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; @@ -368,6 +484,7 @@ 3430F68C1C45C930007473A6 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; diff --git a/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme index 4d43f071932c8c5260ce090cfa9c6e89a216ed41..cc659cfd10fb96b79a8b5581ec98b6411157184c 100644 --- a/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ b/examples/Sample/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -1,6 +1,6 @@ Bool { + private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: Any]?) -> Bool { if UserDefaults.standard.bool(forKey: "firstLaunch") == false { UserDefaults.standard.set(true, forKey: "firstLaunch") UserDefaults.standard.synchronize() @@ -23,7 +23,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let documentsUrl = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] as URL let bundleUrl = Bundle.main.resourceURL for file in fileNames { - if let srcPath = bundleUrl?.appendingPathComponent(file).path, let toPath = documentsUrl.appendingPathComponent(file).path{ + if let srcPath = bundleUrl?.appendingPathComponent(file).path{ + let toPath = documentsUrl.appendingPathComponent(file).path do { try fileManager.copyItem(atPath: srcPath, toPath: toPath) } catch {} diff --git a/examples/Sample/Sample/FileBrowser.swift b/examples/Sample/Sample/FileBrowser.swift index b85e65c591a035883d065af4f9eb0fd2e7ed6378..fd8f862fb823875986bb916238bf9a3b0bc1c744 100644 --- a/examples/Sample/Sample/FileBrowser.swift +++ b/examples/Sample/Sample/FileBrowser.swift @@ -49,16 +49,16 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate self.title = filePath.lastPathComponent tempFiles = try self.fileManager.contentsOfDirectory(atPath: filePath.path) } catch { - if path == "/System" { + if filePath.path == "/System" { tempFiles = ["Library"] } - if path == "/Library" { + if filePath.path == "/Library" { tempFiles = ["Preferences"] } - if path == "/var" { + if filePath == "/var" { tempFiles = ["mobile"] } - if path == "/usr" { + if filePath == "/usr" { tempFiles = ["lib", "libexec", "bin"] } }