diff --git a/FileBrowser.podspec b/FileBrowser.podspec index dc0f291..7fcf15e 100644 --- a/FileBrowser.podspec +++ b/FileBrowser.podspec @@ -33,6 +33,7 @@ Pod::Spec.new do |s| s.source_files = "FileBrowser" s.resources = "FileBrowser/Resources/*.*" s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' } + s.swift_version = '4.1' # s.public_header_files = 'Pod/Classes/**/*.h' s.frameworks = 'QuickLook', 'WebKit' diff --git a/FileBrowser/FBFile.swift b/FileBrowser/FBFile.swift index ff3869d..4090648 100644 --- a/FileBrowser/FBFile.swift +++ b/FileBrowser/FBFile.swift @@ -19,7 +19,7 @@ import Foundation /// File attributes (including size, creation date etc). open let fileAttributes: NSDictionary? /// NSURL file path. - open let filePath: URL + @objc open let filePath: URL // FBFileType open let type: FBFileType diff --git a/FileBrowser/FileBrowser.swift b/FileBrowser/FileBrowser.swift index aad61e3..f282496 100644 --- a/FileBrowser/FileBrowser.swift +++ b/FileBrowser/FileBrowser.swift @@ -16,7 +16,7 @@ open class FileBrowser: UINavigationController { var fileList: FileListViewController? /// File types to exclude from the file browser. - open var excludesFileExtensions: [String]? { + @objc open var excludesFileExtensions: [String]? { didSet { parser.excludesFileExtensions = excludesFileExtensions } @@ -30,7 +30,7 @@ open class FileBrowser: UINavigationController { } /// Override default preview and actionsheet behaviour in favour of custom file handling. - open var didSelectFile: ((FBFile) -> ())? { + @objc open var didSelectFile: ((FBFile) -> ())? { didSet { fileList?.didSelectFile = didSelectFile } @@ -48,7 +48,7 @@ open class FileBrowser: UINavigationController { /// - initialPath: NSURL filepath to containing directory. /// - allowEditing: Whether to allow editing. /// - showCancelButton: Whether to show the cancel button. - public convenience init(initialPath: URL? = nil, allowEditing: Bool = false, showCancelButton: Bool = true) { + @objc public convenience init(initialPath: URL? = nil, allowEditing: Bool = false, showCancelButton: Bool = true) { let validInitialPath = initialPath ?? FileParser.sharedInstance.documentsURL() diff --git a/README.md b/README.md index 6dc6bab..3248a0a 100644 --- a/README.md +++ b/README.md @@ -83,3 +83,10 @@ To integrate FileBrowser into your Xcode project using Carthage, specify it in y ```ogdl github "marmelroy/FileBrowser" ``` + + +## Third Party Bindings + +### React Native +You may now use this library with [React Native](https://github.com/facebook/react-native) via the module [here](https://github.com/prscX/react-native-file-selector) +