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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 40 additions & 23 deletions Examples/FileExplorerExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
06A2087F1D85B9C200E51C13 /* Frameworks */,
06A208801D85B9C200E51C13 /* Resources */,
5E2BF49FC6E9CA6A83EE5B43 /* [CP] Embed Pods Frameworks */,
6655BCBBD66D3041AF14AA34 /* [CP] Copy Pods Resources */,
85894F727B51FF611B6B1828 /* 📦 Embed Pods Frameworks */,
41FCB9208497F02D0B8A0C13 /* 📦 Copy Pods Resources */,
);
Expand All @@ -141,18 +140,19 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0800;
LastUpgradeCheck = 0800;
LastUpgradeCheck = 1120;
ORGANIZATIONNAME = "Rafał Augustyniak";
TargetAttributes = {
06A208811D85B9C200E51C13 = {
CreatedOnToolsVersion = 8.0;
ProvisioningStyle = Automatic;
LastSwiftMigration = 1120;
ProvisioningStyle = Manual;
};
};
};
buildConfigurationList = 06A2087D1D85B9C200E51C13 /* Build configuration list for PBXProject "FileExplorerExampleApp" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -207,13 +207,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-FileExplorerExampleApp-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
5A520E1584492A6DAA8FF519 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -237,28 +240,16 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-FileExplorerExampleApp/Pods-FileExplorerExampleApp-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/FileExplorer/FileExplorer.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FileExplorer.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FileExplorerExampleApp/Pods-FileExplorerExampleApp-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
6655BCBBD66D3041AF14AA34 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-FileExplorerExampleApp/Pods-FileExplorerExampleApp-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-FileExplorerExampleApp/Pods-FileExplorerExampleApp-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
85894F727B51FF611B6B1828 /* 📦 Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -314,20 +305,30 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -364,20 +365,30 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_SUSPICIOUS_MOVES = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
Expand Down Expand Up @@ -408,12 +419,15 @@
baseConfigurationReference = 96BCB9438D07638552D13F50 /* Pods-FileExplorerExampleApp.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = FileExplorerExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.augustyniak.FileExplorerExampleApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -422,12 +436,15 @@
baseConfigurationReference = 77839C1FF7229F28C3A0C502 /* Pods-FileExplorerExampleApp.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = FileExplorerExampleApp/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.augustyniak.FileExplorerExampleApp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Latest</string>
</dict>
</plist>
16 changes: 11 additions & 5 deletions Examples/FileExplorerExampleApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ import FileExplorer
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

let directoryURL = URL.documentDirectory
let audioURL = Bundle.main.url(forResource: "audio", withExtension: "mp3")!
let videoURL = Bundle.main.url(forResource: "video", withExtension: "mp4")!
let pdfURL = Bundle.main.url(forResource: "pdf", withExtension: "pdf")!
let image = UIImage(named: "image.jpg")!
let imageData = UIImagePNGRepresentation(image)!
let imageData = image.pngData()!


let firstDirectoryURL = directoryURL.appendingPathComponent("Directory")
try? FileManager.default.createDirectory(at: firstDirectoryURL, withIntermediateDirectories: true, attributes: [String: Any]())
try? FileManager.default.createDirectory(at: firstDirectoryURL, withIntermediateDirectories: true, attributes: convertToOptionalFileAttributeKeyDictionary([String: Any]()))

let items = [
(audioURL, "audio.mp3"),
Expand All @@ -57,11 +57,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
try? imageData.write(to: imageURL)

let subdirectoryURL = firstDirectoryURL.appendingPathComponent("Empty Directory")
try? FileManager.default.createDirectory(at: subdirectoryURL, withIntermediateDirectories: true, attributes: [String: Any]())
try? FileManager.default.createDirectory(at: subdirectoryURL, withIntermediateDirectories: true, attributes: convertToOptionalFileAttributeKeyDictionary([String: Any]()))

let secondDirectoryURL = directoryURL.appendingPathComponent("Empty Directory")
try? FileManager.default.createDirectory(at: secondDirectoryURL, withIntermediateDirectories: true, attributes: [String: Any]())
try? FileManager.default.createDirectory(at: secondDirectoryURL, withIntermediateDirectories: true, attributes: convertToOptionalFileAttributeKeyDictionary([String: Any]()))

return true
}
}

// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertToOptionalFileAttributeKeyDictionary(_ input: [String: Any]?) -> [FileAttributeKey: Any]? {
guard let input = input else { return nil }
return Dictionary(uniqueKeysWithValues: input.map { key, value in (FileAttributeKey(rawValue: key), value)})
}
4 changes: 2 additions & 2 deletions Examples/FileExplorerExampleApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class ViewController: UIViewController {
}

extension ViewController: FileExplorerViewControllerDelegate {
public func fileExplorerViewController(_ controller: FileExplorerViewController, didChooseURLs urls: [URL]) {
@objc public func fileExplorerViewController(_ controller: FileExplorerViewController, didChooseURLs urls: [URL]) {
var message = ""
for url in urls {
message += "\(url.lastPathComponent)"
Expand All @@ -56,7 +56,7 @@ extension ViewController: FileExplorerViewControllerDelegate {
self.present(alertController, animated: true, completion: nil)
}

public func fileExplorerViewControllerDidFinish(_ controller: FileExplorerViewController) {
@objc public func fileExplorerViewControllerDidFinish(_ controller: FileExplorerViewController) {

}
}
8 changes: 4 additions & 4 deletions Examples/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
PODS:
- FileExplorer (1.0.3)
- FileExplorer (1.0.4)

DEPENDENCIES:
- FileExplorer (from `./../FileExplorer.podspec.json`)

EXTERNAL SOURCES:
FileExplorer:
:path: ./../FileExplorer.podspec.json
:path: "./../FileExplorer.podspec.json"

SPEC CHECKSUMS:
FileExplorer: de421e3b3e07b9cf584264efd5e19f5cdb9a9991
FileExplorer: 9869dc386f080fa7c05083370b07ec0c8a4ced3f

PODFILE CHECKSUM: f09ca52ba3e673398c656e083a29129ede27a7d7

COCOAPODS: 1.2.0.beta.1
COCOAPODS: 1.8.4
4 changes: 2 additions & 2 deletions Examples/Pods/Local Podspecs/FileExplorer.podspec.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Examples/Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading