Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot select Cryptomator folder in SwiftUI file importer #382

Open
2 tasks done
nickasd opened this issue Oct 2, 2024 · 0 comments
Open
2 tasks done

Cannot select Cryptomator folder in SwiftUI file importer #382

nickasd opened this issue Oct 2, 2024 · 0 comments
Labels
type:bug Something isn't working

Comments

@nickasd
Copy link

nickasd commented Oct 2, 2024

Please agree to the following

Summary

The SwiftUI file importer doesn't allow to select folders in a Cryptomator vault

System Setup

  • iOS: 18.0
  • Cryptomator: 2.6.2

Cloud Type

iCloud Drive

Steps to Reproduce

  1. Run a SwiftUI app with the following content:
struct ContentView: View {
    @State private var isPresentingUrlPicker = false
    @State private var label = ""
    
    var body: some View {
        VStack {
            Button("Open") {
                isPresentingUrlPicker = true
            }
            Text(label)
        }
        .fileImporter(isPresented: $isPresentingUrlPicker, allowedContentTypes: [.folder, .data]) { result in
            do {
                let url = try result.get()
                let _ = url.startAccessingSecurityScopedResource()
                label = url.path
                url.stopAccessingSecurityScopedResource()
            } catch {
                label = error.localizedDescription
            }
        }
    }
}
  1. Tap on the Open button.
  2. Select a folder in a Cryptomator vault.

Expected Behavior

The Open button of the file importer should be enabled.

Actual Behavior

The Open button of the file importer is disabled.

Reproducibility

Always

Relevant Log Output

No response

Anything else?

I cannot reproduce the issue myself since I don't have Cryptomator for iOS. I became aware of this through a customer of my app which allows to select folders.

@nickasd nickasd added the type:bug Something isn't working label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant