presentLimitedLibraryPicker(from:completionHandler:)
Prompts the user to update their limited library selection with a callback providing newly selected identifiers.
Declaration
func presentLimitedLibraryPicker(from controller: UIViewController, completionHandler: @escaping @Sendable ([String]) -> Void)func presentLimitedLibraryPicker(from controller: UIViewController) async -> [String]Parameters
- controller:
The view controller from which to present the limited library picker.
- completionHandler:
A closure the system invokes when the user finishes their selection. The closure provides only the newly selected asset identifiers.
Discussion
If the user enabled limited library access using requestAuthorization(for:handler:), use this method to present the limited library picker so they can update their selection. If the user hasn’t enabled limited library access mode for your app, calling this method does nothing. Use this method when disabling the automatic limited library alert prompt. By default, the system automatically prompts the user to update their limited library selection once per app life cycle. To suppress the prompt, add PHPhotoLibraryPreventAutomaticLimitedAccessAlert to your app’s Info.plist file.
Any changes the user applies to the limited library selection trigger a PHPhotoLibraryChangeObserver update.