Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
Zip
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Jira
Jira
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
YongYue
Zip
Commits
8b6298e1
Commit
8b6298e1
authored
Sep 18, 2016
by
Roy Marmelstein
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix example
parent
4a8885d2
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
124 deletions
+10
-124
build.sh
build.sh
+1
-1
examples/Sample/Sample.xcodeproj/project.pbxproj
examples/Sample/Sample.xcodeproj/project.pbxproj
+2
-114
examples/Sample/Sample/AppDelegate.swift
examples/Sample/Sample/AppDelegate.swift
+2
-4
examples/Sample/Sample/FileBrowser.swift
examples/Sample/Sample/FileBrowser.swift
+5
-5
No files found.
build.sh
View file @
8b6298e1
#!/bin/bash
#!/bin/bash
# **** Update me when new Xcode versions are released! ****
# **** Update me when new Xcode versions are released! ****
PLATFORM
=
"platform=iOS Simulator,OS=10.0,name=iPhone
6s
"
PLATFORM
=
"platform=iOS Simulator,OS=10.0,name=iPhone
7
"
SDK
=
"iphonesimulator10.0"
SDK
=
"iphonesimulator10.0"
...
...
examples/Sample/Sample.xcodeproj/project.pbxproj
View file @
8b6298e1
...
@@ -12,8 +12,6 @@
...
@@ -12,8 +12,6 @@
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 */
;
};
...
@@ -29,48 +27,6 @@
...
@@ -29,48 +27,6 @@
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 */
...
@@ -80,7 +36,6 @@
...
@@ -80,7 +36,6 @@
dstPath
=
""
;
dstPath
=
""
;
dstSubfolderSpec
=
10
;
dstSubfolderSpec
=
10
;
files
=
(
files
=
(
343EE1B41D71DE1400244997
/* Zip.framework in Embed Frameworks */
,
);
);
name
=
"Embed Frameworks"
;
name
=
"Embed Frameworks"
;
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
...
@@ -97,7 +52,6 @@
...
@@ -97,7 +52,6 @@
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>"
;
};
...
@@ -110,7 +64,6 @@
...
@@ -110,7 +64,6 @@
isa
=
PBXFrameworksBuildPhase
;
isa
=
PBXFrameworksBuildPhase
;
buildActionMask
=
2147483647
;
buildActionMask
=
2147483647
;
files
=
(
files
=
(
343EE1B31D71DE1400244997
/* Zip.framework in Frameworks */
,
);
);
runOnlyForDeploymentPostprocessing
=
0
;
runOnlyForDeploymentPostprocessing
=
0
;
};
};
...
@@ -127,7 +80,6 @@
...
@@ -127,7 +80,6 @@
3430F6641C45C930007473A6
=
{
3430F6641C45C930007473A6
=
{
isa
=
PBXGroup
;
isa
=
PBXGroup
;
children
=
(
children
=
(
343EE1A11D71DE0D00244997
/* Zip.xcodeproj */
,
3430F66F1C45C930007473A6
/* Sample */
,
3430F66F1C45C930007473A6
/* Sample */
,
3430F6841C45C930007473A6
/* SampleTests */
,
3430F6841C45C930007473A6
/* SampleTests */
,
3430F66E1C45C930007473A6
/* Products */
,
3430F66E1C45C930007473A6
/* Products */
,
...
@@ -169,18 +121,6 @@
...
@@ -169,18 +121,6 @@
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 */
...
@@ -196,7 +136,6 @@
...
@@ -196,7 +136,6 @@
buildRules
=
(
buildRules
=
(
);
);
dependencies
=
(
dependencies
=
(
343EE1B61D71DE1400244997
/* PBXTargetDependency */
,
);
);
name
=
Sample
;
name
=
Sample
;
productName
=
Sample
;
productName
=
Sample
;
...
@@ -253,12 +192,6 @@
...
@@ -253,12 +192,6 @@
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 */
,
...
@@ -267,44 +200,6 @@
...
@@ -267,44 +200,6 @@
};
};
/* 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
;
...
@@ -355,11 +250,6 @@
...
@@ -355,11 +250,6 @@
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 */
...
@@ -425,6 +315,7 @@
...
@@ -425,6 +315,7 @@
ONLY_ACTIVE_ARCH
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
iphoneos
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Onone"
;
SWIFT_VERSION
=
3.0
;
};
};
name
=
Debug
;
name
=
Debug
;
};
};
...
@@ -464,6 +355,7 @@
...
@@ -464,6 +355,7 @@
MTL_ENABLE_DEBUG_INFO
=
NO
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
iphoneos
;
SDKROOT
=
iphoneos
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
SWIFT_OPTIMIZATION_LEVEL
=
"-Owholemodule"
;
SWIFT_VERSION
=
3.0
;
VALIDATE_PRODUCT
=
YES
;
VALIDATE_PRODUCT
=
YES
;
};
};
name
=
Release
;
name
=
Release
;
...
@@ -477,7 +369,6 @@
...
@@ -477,7 +369,6 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.Sample
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.Sample
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
};
};
name
=
Debug
;
name
=
Debug
;
};
};
...
@@ -490,7 +381,6 @@
...
@@ -490,7 +381,6 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.Sample
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.Sample
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
};
};
name
=
Release
;
name
=
Release
;
};
};
...
@@ -502,7 +392,6 @@
...
@@ -502,7 +392,6 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.SampleTests
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.SampleTests
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"
;
};
};
name
=
Debug
;
name
=
Debug
;
...
@@ -515,7 +404,6 @@
...
@@ -515,7 +404,6 @@
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks @loader_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.SampleTests
;
PRODUCT_BUNDLE_IDENTIFIER
=
com.roymarmelstein.SampleTests
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
PRODUCT_NAME
=
"$(TARGET_NAME)"
;
SWIFT_VERSION
=
3.0
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"
;
TEST_HOST
=
"$(BUILT_PRODUCTS_DIR)/Sample.app/Sample"
;
};
};
name
=
Release
;
name
=
Release
;
...
...
examples/Sample/Sample/AppDelegate.swift
View file @
8b6298e1
...
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var
window
:
UIWindow
?
var
window
:
UIWindow
?
private
func
application
(
_
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
Any
]?)
->
Bool
{
func
applicationDidFinishLaunching
(
_
application
:
UIApplication
)
{
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
()
...
@@ -31,8 +31,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
...
@@ -31,8 +31,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}
}
}
}
}
}
// Override point for customization after application launch.
return
true
}
}
func
applicationWillResignActive
(
_
application
:
UIApplication
)
{
func
applicationWillResignActive
(
_
application
:
UIApplication
)
{
...
...
examples/Sample/Sample/FileBrowser.swift
View file @
8b6298e1
...
@@ -55,10 +55,10 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
...
@@ -55,10 +55,10 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
if
filePath
.
path
==
"/Library"
{
if
filePath
.
path
==
"/Library"
{
tempFiles
=
[
"Preferences"
]
tempFiles
=
[
"Preferences"
]
}
}
if
filePath
==
"/var"
{
if
filePath
.
path
==
"/var"
{
tempFiles
=
[
"mobile"
]
tempFiles
=
[
"mobile"
]
}
}
if
filePath
==
"/usr"
{
if
filePath
.
path
==
"/usr"
{
tempFiles
=
[
"lib"
,
"libexec"
,
"bin"
]
tempFiles
=
[
"lib"
,
"libexec"
,
"bin"
]
}
}
}
}
...
@@ -92,7 +92,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
...
@@ -92,7 +92,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
var
isDirectory
:
ObjCBool
=
false
var
isDirectory
:
ObjCBool
=
false
fileManager
.
fileExists
(
atPath
:
newPath
,
isDirectory
:
&
isDirectory
)
fileManager
.
fileExists
(
atPath
:
newPath
,
isDirectory
:
&
isDirectory
)
cell
.
textLabel
?
.
text
=
files
[(
indexPath
as
NSIndexPath
)
.
row
]
cell
.
textLabel
?
.
text
=
files
[(
indexPath
as
NSIndexPath
)
.
row
]
if
isDirectory
{
if
isDirectory
.
boolValue
{
cell
.
imageView
?
.
image
=
UIImage
(
named
:
"Folder"
)
cell
.
imageView
?
.
image
=
UIImage
(
named
:
"Folder"
)
}
}
else
{
else
{
...
@@ -139,7 +139,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
...
@@ -139,7 +139,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
let
filePath
=
selectedFiles
.
first
let
filePath
=
selectedFiles
.
first
let
pathURL
=
path
!.
appendingPathComponent
(
filePath
!
)
let
pathURL
=
path
!.
appendingPathComponent
(
filePath
!
)
do
{
do
{
try
Zip
.
quickUnzipFile
(
pathURL
)
let
_
=
try
Zip
.
quickUnzipFile
(
pathURL
)
self
.
selectedFiles
.
removeAll
()
self
.
selectedFiles
.
removeAll
()
updateSelection
()
updateSelection
()
updateFiles
()
updateFiles
()
...
@@ -154,7 +154,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
...
@@ -154,7 +154,7 @@ class FileBrowser: UIViewController, UITableViewDataSource, UITableViewDelegate
urlPaths
.
append
(
path
!.
appendingPathComponent
(
filePath
))
urlPaths
.
append
(
path
!.
appendingPathComponent
(
filePath
))
}
}
do
{
do
{
try
Zip
.
quickZipFiles
(
urlPaths
,
fileName
:
"Archive"
)
let
_
=
try
Zip
.
quickZipFiles
(
urlPaths
,
fileName
:
"Archive"
)
self
.
selectedFiles
.
removeAll
()
self
.
selectedFiles
.
removeAll
()
updateSelection
()
updateSelection
()
updateFiles
()
updateFiles
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment