How to get path of images with IOS 16 image picker SwiftUI

535 views Asked by At

Good day,

How do I get the path of images from the ios 16 Photos Picker(PhotosUI Library) as I am trying to store the path in a json file to retrieve later to display

I have a form with a image picker and I want to store the path in json file and then later retrieve the path from the json file to show the image on another view.

1

There are 1 answers

2
matt On

There are no images and no paths. The photo library is a database.

You can get the photo asset's identifier if you have permissions, and then you can use that elsewhere to fetch the same photo from the database.