Halcon 0 Posted March 4, 2021 Hello friends: I'm developing an App that users can make their own images. That images must be saved on local or public folder (destination is indifferent), but I need that users can view their images on the gallery of device. By example, WhatsApp uses their own gallery images folder (as separate folder with "WhatsApp" name), and users can view the images on iOS "Photos" official App. I need as well get (load in to TImage) the images saved. Definitely, I need load and save images from my App, and images should be able to see in General gallery. I Tried to use IFMXImageManagerService, but is not supported by iOS. I've been looking for a solution for 3 days, please, any recommendation? Thanks in advance. Jose. Share this post Link to post
Guest Posted March 4, 2021 I dont iOS phones, but is not basic function of system found the pictures on smartphones? I see in my Android, that my pictures is finded be where it is. hug Share this post Link to post
Halcon 0 Posted March 4, 2021 3 hours ago, emailx45 said: I dont iOS phones, but is not basic function of system found the pictures on smartphones? I see in my Android, that my pictures is finded be where it is. hug No hug..., iOS is very very protected. You can save images with IFMXPhotoLibrary, but you haven't control of it. iOS saved with other name and then you can't access to that image. I can't find any method for save and get images that can view on the phone gallery. Only can get images with user intevention (you call to TTakenPhotoFromLibrary and user must select the image that loads in to TImage in the App). I think that must exists any method, because apps like WhatsApp or DJI (drones) have their own folder gallery that can view in to phone gallery, and that images can save and/or load by that Apps. Share this post Link to post
Dave Nottage 557 Posted March 4, 2021 3 hours ago, Halcon said: I can't find any method for save and get images that can view on the phone gallery Since iOS 8, use the PhotoKit framework to access photos in albums: PhotoKit | Apple Developer Documentation I have an import for it, here: https://github.com/DelphiWorlds/Kastri/blob/master/API/DW.iOSapi.Photos.pas Which likely needs updating, because I think I imported it around iOS 9 era. This will not help you however, if you are saving photos as files somewhere. You can retrieve the filename from an asset in the gallery, bearing in mind can be traps in doing so: https://medium.com/@slk11075/traps-for-phasset-how-to-get-filename-from-phasset-67d856e75c64 2 1 Share this post Link to post
tiagoom 0 Posted March 12, 2021 I'am with the same problem.... Solutions or samples for the kastri library or other? Share this post Link to post
KodeZwerg 54 Posted March 12, 2021 (edited) Have you tried load/save with TBitmap."Save/Load"ToFile(TPath.Combine(TPath.GetDocumentsPath, 'myApp') + 'FileName.ext') ? Edited March 12, 2021 by KodeZwerg Share this post Link to post