Platform-Specific Settings
JVM Settings
On JVM platforms (Windows, macOS, Linux), you can customize:title: Set a custom title for the dialogparent: Set the typed parent window identity used for modality and stackingmacOS: Configure macOS-specific settings
FileKitDialogParent represents one canonical parent, with factories for each
supported JVM window system:
wayland() accepts the unprefixed opaque handle exported through
xdg_foreign. FileKit adds the wayland: portal prefix without trimming or
normalizing the value. A raw wl_surface*, a Tao handle, and a string that you
invented from a pointer are not exported Wayland handles.IllegalArgumentException. A valid parent that the active
picker cannot use, or an AWT parent that cannot resolve to a native identifier,
throws FileKitPickerException before opening the dialog.
Compose Desktop
TheWindowScope.remember*Launcher extensions automatically use the scope’s AWT
window and replace any parent already present in the supplied settings. For a
plain launcher or direct picker call, provide it explicitly:
Migrating from FileKit 0.14
The JVM settings API intentionally changed in FileKit 0.15. Replace:parentWindow property or constructor.
Nucleus with the Tao backend
Nucleus 2.3.2 exposes the native identities needed to parent Tao dialogs on Windows and Linux/X11. Adapt the framework-specific window locally and pass the resulting settings to a plain, non-WindowScope launcher:
nucleusWindow.unsafe.taoHandle: it is an opaque Tao event-loop
identity, not an operating-system dialog parent. On Wayland, x11WindowId is
null, so this adapter deliberately opens an unparented dialog. Wayland parent
exports and macOS NSWindow sheets are deferred pending community feedback; both
require lifecycle handling beyond these direct Windows and X11 conversions.
The dialog also remains unparented when the Nucleus window has not exposed a
supported identity yet.
iOS and macOS Settings
On iOS and macOS, you can configure:title: Set a custom title for the dialogcanCreateDirectories: Allow or prevent directory creation in dialogs (default: true)
assetRepresentationMode: Choose the Photos picker asset representation mode (default:Automatic)presenter: Set theUIViewControllerused to present native dialogs. If null, FileKit uses the current top-most controller.
Automatic: Let the system choose the best representationCurrent: Prefer the original/current representation and avoid transcoding when possibleCompatible: Prefer a broadly compatible representation, even if transcoding is required
Compatible when picked image bytes need to be decoded by libraries that may not support every Apple-native image format, such as HEIF/HEIC.
Android, Web, and WASM
These platforms currently don’t have any specific settings to configure. Use the default settings:Using DialogSettings in KMP
When working with Kotlin Multiplatform projects, you might need to handle platform-specific settings differently. Here’s how to use expect/actual to manage dialog settings: For platforms that need specific configuration, use expect/actual:- Keep your common code platform-agnostic
- Provide platform-specific configurations where needed
- Maintain type safety across platforms
Platform-specific settings are continuously evolving. You can ask for a feature or report a bug on the GitHub repository.