One Logo Pool Ball
Additional SDK Modules · IOS API REFERENCE

_PhotosUI_SwiftUI

Explore _PhotosUI_SwiftUI types and the APIs available through One's generated iOS bindings.

7 types

21 callable entries

28 skipped

43% entry coverage

Generated from iOS SDK 27.1. Availability is shown on each declaration; permissions and entitlements still apply.

Types

Functions and constants

init · iOS 16.0+

init

TypeScript
static initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncodingPhotoLibrary(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount: (number) | null, selectionBehavior: PhotosPickerSelectionBehavior, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary)

Creates a Photos picker with its label generated from a localized string key that selects a collection of `PhotosPickerItem` from a given photo library. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - titleKey: A localized string key that describes the purpose of showing the picker. - selection: All items being shown and selected in the Photos picker. - maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system. - selectionBehavior: The selection behavior of the Photos picker. Default is `.default`. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used. - photoLibrary: The photo library to choose from.

init · iOS 16.0+

init

TypeScript
static initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncodingPhotoLibrary71217(title: string, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount: (number) | null, selectionBehavior: PhotosPickerSelectionBehavior, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary) where S : StringProtocol

Creates a Photos picker with its label generated from a string that selects a collection of `PhotosPickerItem` from a given photo library. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - title: A string that describes the purpose of showing the picker. - selection: All items being shown and selected in the Photos picker. - maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system. - selectionBehavior: The selection behavior of the Photos picker. Default is `.default`. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used. - photoLibrary: The photo library to choose from.

init · iOS 16.0+

init

TypeScript
static initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncoding(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount?: (number) | null, selectionBehavior?: PhotosPickerSelectionBehavior, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic)

Creates a Photos picker with its label generated from a localized string key that selects a collection of `PhotosPickerItem`. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - titleKey: A localized string key that describes the purpose of showing the picker. - selection: All items being shown and selected in the Photos picker. - maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system. - selectionBehavior: The selection behavior of the Photos picker. Default is `.default`. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.

init · iOS 16.0+

init

TypeScript
static initSelectionMaxSelectionCountSelectionBehaviorMatchingPreferredItemEncoding9462(title: string, selection: _SwiftUICore_Binding<Array<PhotosPickerItem>>, maxSelectionCount?: (number) | null, selectionBehavior?: PhotosPickerSelectionBehavior, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<[PhotosPickerItem]>, maxSelectionCount: Int? = nil, selectionBehavior: PhotosPickerSelectionBehavior = .default, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic) where S : StringProtocol

Creates a Photos picker with its label generated from a string that selects a collection of `PhotosPickerItem`. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - title: A string that describes the purpose of showing the picker. - selection: All items being shown and selected in the Photos picker. - maxSelectionCount: The maximum number of items that can be selected. Default is `nil`. Setting it to `nil` means maximum supported by the system. - selectionBehavior: The selection behavior of the Photos picker. Default is `.default`. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of selected items. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.

init · iOS 16.0+

init

TypeScript
static initSelectionMatchingPreferredItemEncodingPhotoLibrary(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary)

Creates a Photos picker with its label generated from a localized string key that selects a `PhotosPickerItem` from a given photo library. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - titleKey: A localized string key that describes the purpose of showing the picker. - selection: The item being shown and selected in the Photos picker. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used. - photoLibrary: The photo library to choose from.

init · iOS 16.0+

init

TypeScript
static initSelectionMatchingPreferredItemEncodingPhotoLibrary43487(title: string, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding: PhotosPickerItem_EncodingDisambiguationPolicy, photoLibrary: _Photos_PHPhotoLibrary): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic, photoLibrary: PHPhotoLibrary) where S : StringProtocol

Creates a Photos picker with its label generated from a string that selects a `PhotosPickerItem` from a given photo library. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - title: A string that describes the purpose of showing the picker. - selection: The item being shown and selected in the Photos picker. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used. - photoLibrary: The photo library to choose from.

init · iOS 16.0+

init

TypeScript
static initSelectionMatchingPreferredItemEncoding(titleKey: _SwiftUICore_LocalizedStringKey, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init(_ titleKey: LocalizedStringKey, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic)

Creates a Photos picker with its label generated from a localized string key that selects a `PhotosPickerItem`. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - titleKey: A localized string key that describes the purpose of showing the picker. - selection: The item being shown and selected in the Photos picker. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.

init · iOS 16.0+

init

TypeScript
static initSelectionMatchingPreferredItemEncoding50544(title: string, selection: _SwiftUICore_Binding<(PhotosPickerItem) | null>, filter?: (_PhotosUI_PHPickerFilter) | null, preferredItemEncoding?: PhotosPickerItem_EncodingDisambiguationPolicy): Promise<PhotosPicker<_SwiftUICore_Text>>
Swift declaration
nonisolated init<S>(_ title: S, selection: Binding<PhotosPickerItem?>, matching filter: PHPickerFilter? = nil, preferredItemEncoding: PhotosPickerItem.EncodingDisambiguationPolicy = .automatic) where S : StringProtocol

Creates a Photos picker with its label generated from a string that selects a `PhotosPickerItem`. The user explicitly grants access only to items they choose, so photo library access authorization is not needed. - Parameters: - title: A string that describes the purpose of showing the picker. - selection: The item being shown and selected in the Photos picker. - filter: Types of items that can be shown. Default is `nil`. Setting it to `nil` means all supported types can be shown. - preferredItemEncoding: The encoding disambiguation policy of the selected item. Default is `.automatic`. Setting it to `.automatic` means the best encoding determined by the system will be used.

Skipped declarations

28 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

PHLivePhoto.transferRepresentation

This protocol needs associated types that cannot yet cross the bridge.

View.photosSharedAlbumCreationSheet(isPresented:defaultTitle:defaultSharingPolicy:photoLibrary:onCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosSharedAlbumCustomizationSheet(isPresented:albumIdentifier:photoLibrary:onCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)

This protocol needs associated types that cannot yet cross the bridge.

View.postToPhotosSharedAlbumSheet(isPresented:items:photoLibrary:defaultAlbumIdentifier:completion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosSharedAlbumPostingSheet(isPresented:items:defaultAlbumIdentifier:photoLibrary:completion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosReferenceImageViewer(asset:onProcessingCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosReferenceImageViewer(pickerItem:onProcessingCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosReferenceImageViewer(pickerResult:onProcessingCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosReferenceImageViewer(fileURL:onProcessingCompletion:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPicker(isPresented:selection:matching:preferredItemEncoding:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPicker(isPresented:selection:matching:preferredItemEncoding:photoLibrary:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPicker(isPresented:selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerStyle(_:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerAccessoryVisibility(_:edges:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerDisabledCapabilities(_:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerMetadataOptions(_:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerSearchText(_:)

This protocol needs associated types that cannot yet cross the bridge.

View.photosPickerSearchText(_:)

This protocol needs associated types that cannot yet cross the bridge.

PhotosPickerItem.loadTransferable(type:completionHandler:)

The iOS SDK compiler rejected this binding: cannot find 'AppIntents' in scope

PhotosPickerItem.loadTransferable(type:)

The iOS SDK compiler rejected this binding: cannot find 'AppIntents' in scope

PhotosPicker.init(selection:matching:preferredItemEncoding:label:)

callback cannot propagate synchronous failure

PhotosPicker.init(selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:label:)

callback cannot propagate synchronous failure

PhotosPicker.init(selection:matching:preferredItemEncoding:photoLibrary:label:)

callback cannot propagate synchronous failure

PhotosPicker.init(selection:maxSelectionCount:selectionBehavior:matching:preferredItemEncoding:photoLibrary:label:)

callback cannot propagate synchronous failure

PhotosPicker.body

This protocol needs associated types that cannot yet cross the bridge.