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

iOS: File picker cannot be opened #174

Open
Shunfeii opened this issue Dec 20, 2024 · 2 comments
Open

iOS: File picker cannot be opened #174

Shunfeii opened this issue Dec 20, 2024 · 2 comments

Comments

@Shunfeii
Copy link

Shunfeii commented Dec 20, 2024

When i use filepicker on ios it makes error

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIWindowScene keyWindow]: unrecognized selector sent to instance 0x109909730'

Here is my code:

val launcher = rememberFilePickerLauncher(mode = PickerMode.Multiple()) { files ->
    // Handle picked files
    if (files != null) {
        println(files.get(0))
    }
}

Box (
    modifier = Modifier.fillMaxSize()
) {
    Column(
        modifier = Modifier.fillMaxSize()
    ) {
        titleBar(
            title = screenModel.deviceName.value,
            native = navigator,
            backgroundColor = Color.White
        )
        Button(
            onClick = {
                launcher.launch()
            }
        ) {
            Text(
                text = "picker"
            )
        }
    }
}
@Shunfeii
Copy link
Author

i can run it on simulators but cant open on real device

@vinceglb
Copy link
Owner

Hi @Shunfeii! Thanks for creating this issue.

  • What is the version of your physical iOS device? And the version of the iOS Simulator that you are using?
  • What is the version of FileKit that you are using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants