From 0b5bec29635cf78bd46924bb8325538d57d8d3df Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Tue, 20 Aug 2024 18:51:05 +0100 Subject: [PATCH] Remove iOS 15.0+ PHPickerConfiguration APIs --- .../FilePickerLauncher.ios.kt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/calf-file-picker/src/iosMain/kotlin/com.mohamedrejeb.calf.picker/FilePickerLauncher.ios.kt b/calf-file-picker/src/iosMain/kotlin/com.mohamedrejeb.calf.picker/FilePickerLauncher.ios.kt index cb7acd9..4fb08b0 100644 --- a/calf-file-picker/src/iosMain/kotlin/com.mohamedrejeb.calf.picker/FilePickerLauncher.ios.kt +++ b/calf-file-picker/src/iosMain/kotlin/com.mohamedrejeb.calf.picker/FilePickerLauncher.ios.kt @@ -281,14 +281,10 @@ private fun createPHPickerViewController( filterList.add(PHPickerFilter.videosFilter()) } } - val newFilter = - PHPickerFilter.anyFilterMatchingSubfilters(filterList.toList()) + val newFilter = PHPickerFilter.anyFilterMatchingSubfilters(filterList.toList()) configuration.filter = newFilter - configuration.preferredAssetRepresentationMode = - PHPickerConfigurationAssetRepresentationModeCurrent - configuration.selection = PHPickerConfigurationSelectionOrdered + configuration.preferredAssetRepresentationMode = PHPickerConfigurationAssetRepresentationModeCurrent configuration.selectionLimit = if (selectionMode == FilePickerSelectionMode.Multiple) 0 else 1 - configuration.preselectedAssetIdentifiers = listOf() val picker = PHPickerViewController(configuration) picker.delegate = delegate return picker