cryptomator / cryptomator/ios

Cannot select Cryptomator folder in SwiftUI file importer

Open
#382 6 comments 0 reactions 0 assignees View on GitHub
state:to-be-confirmed
Dominant language
Swift
Stars
288
Forks
43
PR merge metrics
No merged PRs in 30d

Description

### Please agree to the following

- [x] I have searched [existing issues](https://github.com/cryptomator/ios/issues?q=) for duplicates
- [X] I agree to follow this project's [Code of Conduct](https://github.com/cryptomator/ios/blob/develop/.github/CODE_OF_CONDUCT.md)

### 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
}
}
}
}
```
2. Tap on the Open button.
3. 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.