Skip to content

iOS crash choosing image #527

@LinKav20

Description

@LinKav20

Crush in iOS in kotlin multiplatfrom project. I use this code in common feature module to select image
val image = FileKit.openFilePicker(type = FileKitType.Image)
I have image in my phone. Also my phone has icloud sync. But I can select this file in file picker and my app will crush.

I guess that happen some sync error and photo dont loaded to device from icloud. I can see and select the photo because the system displays all files that are in iCloud, regardless of whether they are downloaded or not. The crash occurs because the actual file is not present on the device.

lib version: 0.13.0
ios version: 26.3

Uncaught Kotlin exception: kotlin.IllegalStateException (message=null)
Thread: main (dispatch_main_queue)
at 4  MyApp.debug.dylib  0x10f70c453
    kfun:io.github.vinceglb.filekit.dialogs.callPhPicker$1...
    callPhPicker...invoke#internal + 695
at 5  MyApp.debug.dylib  0x10f70c8f7
    kfun:...$<bridge-DNNN>invoke(platform.Foundation.NSURL?; platform.Foundation.NSError?){}#internal + 127
    // callback signature: (NSURL?, NSError?)
at 7  MyApp.debug.dylib  0x10f70c07b
    .../filekit-dialogs/src/iosMain/kotlin/.../FileKit.ios.kt_knbridge177 + 231
at 8  PhotosUI  0x1e266d1c7  <redacted> + 383
at 9  PhotosUI  0x1e266e137  <redacted> + 191
at 11 libdispatch.dylib _dispatch_call_block_and_release + 31
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    nextScheduled for the next version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions