I'm trying to save an image with a custom filename with PHPhotoLibrary but it for me is impossible. The filename of image always is IMG_XXX.JPG. I get its filename from photos program.
I don't see the filename in my iPhone.
I'm trying to save an image with a custom filename with PHPhotoLibrary but it for me is impossible. The filename of image always is IMG_XXX.JPG. I get its filename from photos program.
I don't see the filename in my iPhone.
Filenames within the Photos library are an implementation detail. They're not exactly private, but they aren't there as something for you to mess with or rely on the stability of. (For example, if you grab the underlying image file for an asset, it'll have one name, but that name may change if the user edits that asset in the Photos app or it gets uncached and re-downloaded from iCloud Photo Library.)
You can get a filename when you read an asset from the Photos library, simply as a side effect of being able to get an original file. You're not allowed to set filenames in the Photos library, because Photos manages its own storage.
And of course, if you read an asset's original file and want to save a copy of it somewhere else, you can give that copy whatever filename you want.