FileBrowser icon indicating copy to clipboard operation
FileBrowser copied to clipboard

Swift 5 compatible is needed

Open kishore94 opened this issue 5 years ago • 4 comments

kishore94 avatar Jan 13 '20 06:01 kishore94

Hi, we have a fork with Swift 5.0 support if you still need it: https://github.com/Nuglif/FileBrowser/tree/master

lisional avatar Mar 25 '20 14:03 lisional

Is this going to be available as a Pod? I need the "@objc" added to the init method in FileBrowser so I can use this from Objective C. The 1.0.0 version does not have this change but the Swift 5 fork does.

machive avatar Mar 30 '20 17:03 machive

It's always available in your Podfile by using pod 'FileBrowser', git: 'https://github.com/Nuglif/FileBrowser'

You can also specify a specific commit you want. And if you want something merged, open a PR on our fork!

lisional avatar Mar 31 '20 20:03 lisional

Here is a view representable for SwiftUI usage

import SwiftUI
import UIKit
import FileBrowser

struct FileListViewControllerRepresentable: UIViewControllerRepresentable {
    typealias UIViewControllerType = FileBrowser

    func makeUIViewController(context: UIViewControllerRepresentableContext<FileListViewControllerRepresentable>) -> FileBrowser {
        return FileBrowser()
    }

    func updateUIViewController(_ uiViewController: FileBrowser, context: UIViewControllerRepresentableContext<FileListViewControllerRepresentable>) {
    } 
}  

struct fileBrowswerRepresentable_Previews: PreviewProvider {
    static var previews: some View {
        FileListViewControllerRepresentable()
    }
 }

rlegault33 avatar Dec 05 '20 16:12 rlegault33