Commit 4a8885d2 authored by Roy Marmelstein's avatar Roy Marmelstein

Swift 3 fixes

parent e29d22e8
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
3430F6781C45C930007473A6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6771C45C930007473A6 /* Assets.xcassets */; }; 3430F6781C45C930007473A6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6771C45C930007473A6 /* Assets.xcassets */; };
3430F67B1C45C930007473A6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6791C45C930007473A6 /* LaunchScreen.storyboard */; }; 3430F67B1C45C930007473A6 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 3430F6791C45C930007473A6 /* LaunchScreen.storyboard */; };
3430F6861C45C930007473A6 /* SampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3430F6851C45C930007473A6 /* SampleTests.swift */; }; 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 */; }; 3467DAED1C4BADB700BA3DB8 /* FileBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3467DAEC1C4BADB700BA3DB8 /* FileBrowser.swift */; };
3467DAF31C4BF17900BA3DB8 /* Image1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */; }; 3467DAF31C4BF17900BA3DB8 /* Image1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */; };
3467DAF41C4BF17900BA3DB8 /* Image2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAF01C4BF17900BA3DB8 /* Image2.jpg */; }; 3467DAF41C4BF17900BA3DB8 /* Image2.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 3467DAF01C4BF17900BA3DB8 /* Image2.jpg */; };
...@@ -27,6 +29,48 @@ ...@@ -27,6 +29,48 @@
remoteGlobalIDString = 3430F66C1C45C930007473A6; remoteGlobalIDString = 3430F66C1C45C930007473A6;
remoteInfo = Sample; 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 */ /* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */ /* Begin PBXCopyFilesBuildPhase section */
...@@ -36,6 +80,7 @@ ...@@ -36,6 +80,7 @@
dstPath = ""; dstPath = "";
dstSubfolderSpec = 10; dstSubfolderSpec = 10;
files = ( files = (
343EE1B41D71DE1400244997 /* Zip.framework in Embed Frameworks */,
); );
name = "Embed Frameworks"; name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
...@@ -52,6 +97,7 @@ ...@@ -52,6 +97,7 @@
3430F6811C45C930007473A6 /* SampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 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 = "<group>"; }; 3430F6851C45C930007473A6 /* SampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SampleTests.swift; sourceTree = "<group>"; };
3430F6871C45C930007473A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; 3430F6871C45C930007473A6 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
343EE1A11D71DE0D00244997 /* Zip.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Zip.xcodeproj; path = ../../Zip.xcodeproj; sourceTree = "<group>"; };
3467DAEC1C4BADB700BA3DB8 /* FileBrowser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileBrowser.swift; sourceTree = "<group>"; }; 3467DAEC1C4BADB700BA3DB8 /* FileBrowser.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileBrowser.swift; sourceTree = "<group>"; };
3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image1.jpg; sourceTree = "<group>"; }; 3467DAEF1C4BF17900BA3DB8 /* Image1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image1.jpg; sourceTree = "<group>"; };
3467DAF01C4BF17900BA3DB8 /* Image2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image2.jpg; sourceTree = "<group>"; }; 3467DAF01C4BF17900BA3DB8 /* Image2.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = Image2.jpg; sourceTree = "<group>"; };
...@@ -64,6 +110,7 @@ ...@@ -64,6 +110,7 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
343EE1B31D71DE1400244997 /* Zip.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -80,6 +127,7 @@ ...@@ -80,6 +127,7 @@
3430F6641C45C930007473A6 = { 3430F6641C45C930007473A6 = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
343EE1A11D71DE0D00244997 /* Zip.xcodeproj */,
3430F66F1C45C930007473A6 /* Sample */, 3430F66F1C45C930007473A6 /* Sample */,
3430F6841C45C930007473A6 /* SampleTests */, 3430F6841C45C930007473A6 /* SampleTests */,
3430F66E1C45C930007473A6 /* Products */, 3430F66E1C45C930007473A6 /* Products */,
...@@ -121,6 +169,18 @@ ...@@ -121,6 +169,18 @@
path = SampleTests; path = SampleTests;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
343EE1A21D71DE0D00244997 /* Products */ = {
isa = PBXGroup;
children = (
343EE1AA1D71DE0D00244997 /* Zip.framework */,
343EE1AC1D71DE0D00244997 /* ZipTests.xctest */,
343EE1AE1D71DE0D00244997 /* Zip.framework */,
343EE1B01D71DE0D00244997 /* Zip OSXTests.xctest */,
343EE1B21D71DE0D00244997 /* Zip.framework */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
...@@ -136,6 +196,7 @@ ...@@ -136,6 +196,7 @@
buildRules = ( buildRules = (
); );
dependencies = ( dependencies = (
343EE1B61D71DE1400244997 /* PBXTargetDependency */,
); );
name = Sample; name = Sample;
productName = Sample; productName = Sample;
...@@ -167,7 +228,7 @@ ...@@ -167,7 +228,7 @@
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0720; LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720; LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Roy Marmelstein"; ORGANIZATIONNAME = "Roy Marmelstein";
TargetAttributes = { TargetAttributes = {
3430F66C1C45C930007473A6 = { 3430F66C1C45C930007473A6 = {
...@@ -192,6 +253,12 @@ ...@@ -192,6 +253,12 @@
mainGroup = 3430F6641C45C930007473A6; mainGroup = 3430F6641C45C930007473A6;
productRefGroup = 3430F66E1C45C930007473A6 /* Products */; productRefGroup = 3430F66E1C45C930007473A6 /* Products */;
projectDirPath = ""; projectDirPath = "";
projectReferences = (
{
ProductGroup = 343EE1A21D71DE0D00244997 /* Products */;
ProjectRef = 343EE1A11D71DE0D00244997 /* Zip.xcodeproj */;
},
);
projectRoot = ""; projectRoot = "";
targets = ( targets = (
3430F66C1C45C930007473A6 /* Sample */, 3430F66C1C45C930007473A6 /* Sample */,
...@@ -200,6 +267,44 @@ ...@@ -200,6 +267,44 @@
}; };
/* End PBXProject section */ /* 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 */ /* Begin PBXResourcesBuildPhase section */
3430F66B1C45C930007473A6 /* Resources */ = { 3430F66B1C45C930007473A6 /* Resources */ = {
isa = PBXResourcesBuildPhase; isa = PBXResourcesBuildPhase;
...@@ -250,6 +355,11 @@ ...@@ -250,6 +355,11 @@
target = 3430F66C1C45C930007473A6 /* Sample */; target = 3430F66C1C45C930007473A6 /* Sample */;
targetProxy = 3430F6821C45C930007473A6 /* PBXContainerItemProxy */; targetProxy = 3430F6821C45C930007473A6 /* PBXContainerItemProxy */;
}; };
343EE1B61D71DE1400244997 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Zip;
targetProxy = 343EE1B51D71DE1400244997 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */ /* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */ /* Begin PBXVariantGroup section */
...@@ -285,8 +395,10 @@ ...@@ -285,8 +395,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
...@@ -329,8 +441,10 @@ ...@@ -329,8 +441,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
...@@ -349,6 +463,7 @@ ...@@ -349,6 +463,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.2; IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = NO; MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos; SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES; VALIDATE_PRODUCT = YES;
}; };
name = Release; name = Release;
...@@ -356,6 +471,7 @@ ...@@ -356,6 +471,7 @@
3430F68B1C45C930007473A6 /* Debug */ = { 3430F68B1C45C930007473A6 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Sample/Info.plist; INFOPLIST_FILE = Sample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
...@@ -368,6 +484,7 @@ ...@@ -368,6 +484,7 @@
3430F68C1C45C930007473A6 /* Release */ = { 3430F68C1C45C930007473A6 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
buildSettings = { buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Sample/Info.plist; INFOPLIST_FILE = Sample/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<Scheme <Scheme
LastUpgradeVersion = "0720" LastUpgradeVersion = "0800"
version = "1.3"> version = "1.3">
<BuildAction <BuildAction
parallelizeBuildables = "YES" parallelizeBuildables = "YES"
......
...@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: Any]?) -> Bool { private func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: Any]?) -> Bool {
if UserDefaults.standard.bool(forKey: "firstLaunch") == false { if UserDefaults.standard.bool(forKey: "firstLaunch") == false {
UserDefaults.standard.set(true, forKey: "firstLaunch") UserDefaults.standard.set(true, forKey: "firstLaunch")
UserDefaults.standard.synchronize() UserDefaults.standard.synchronize()
...@@ -23,7 +23,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -23,7 +23,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
let documentsUrl = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] as URL let documentsUrl = fileManager.urls(for: .documentDirectory, in: .userDomainMask)[0] as URL
let bundleUrl = Bundle.main.resourceURL let bundleUrl = Bundle.main.resourceURL
for file in fileNames { 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 { do {
try fileManager.copyItem(atPath: srcPath, toPath: toPath) try fileManager.copyItem(atPath: srcPath, toPath: toPath)
} catch {} } catch {}
......
...@@ -49,16 +49,16 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate ...@@ -49,16 +49,16 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
self.title = filePath.lastPathComponent self.title = filePath.lastPathComponent
tempFiles = try self.fileManager.contentsOfDirectory(atPath: filePath.path) tempFiles = try self.fileManager.contentsOfDirectory(atPath: filePath.path)
} catch { } catch {
if path == "/System" { if filePath.path == "/System" {
tempFiles = ["Library"] tempFiles = ["Library"]
} }
if path == "/Library" { if filePath.path == "/Library" {
tempFiles = ["Preferences"] tempFiles = ["Preferences"]
} }
if path == "/var" { if filePath == "/var" {
tempFiles = ["mobile"] tempFiles = ["mobile"]
} }
if path == "/usr" { if filePath == "/usr" {
tempFiles = ["lib", "libexec", "bin"] tempFiles = ["lib", "libexec", "bin"]
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment