Embed the Photo Picker in your App


The new photo picker, you don’t need request any permissions to use it.  It is only a few lines of code to use this.

Embedded Picker

  • The access model runs in a separate model outside of your app. Only what is selected is passed back to your app.
    • You can use the new .photosPickerDisabledCapabilities modifier to turn off certain features of the picker
    • You can disable various accessories to with .photosPickerAccessoryVisibility modifier
    • You can even change the size of the picker
    • You can use the new .photosPickerStyle(.inline) to make it more naturally a part of your app
    • PhotosPicker(selectionBehavior: .continuous) allows your app to respond to each selection of an image.
  • There’s a new privacy badge on the picker
  • A detailed scission of which options can be disabled in the sessions including search, selection actions, and more
  • The picker style include presentation, inline and compact style (a single row – scrolling horizontally)
  • This API is available for iOS, iPadOS, macOS, along with SwiftUI, AppKit and UIKit – it was not listed for xrOS or VisionOS

Options Menu

  • This is a new menu, which gives users control of what is shared with your app.  They can select to remove metadata and location as example.

HDR and Cinematic

  • The system may automatically transform assets to things like JPEF, but if you want to include HDR data
    • you need so set .current encoding policy
    • And use .image or .more for content type