So I have a image which I get from my server. I want to save that image locally. I have already considered using Userdefaults or Core Data for this instead, but I want the user to be able to see and view the photos from their photos app. So I have a saved photo which is saved using UIImageWriteToSavedPhotosAlbum. How do I later retrieve that same image in my app? This includes even after the app is closed and relaunched.
Get photo that is saved to photo library in swift
833 views Asked by KingCoder11 At
1
Are you using the PHPhotoLibrary framework? If so, you can use
PHFetchOptionsto fetch the photos that were saved by your application. Enter parameters such as album name to retrieve the photos you have saved.If you have the url of the image being stored using
UIImageWriteToSavedPhotosAlbumthen use that url to retrieve that image using FileManager API.Get image from documents directory swift