I need help/example to add photos and videos to photo library in iOS using creationRequestForAssetFromImageAtFileURL/creationRequestForAssetFromVideoAtFileURL.
I need help/example to add photos and videos to photo library in iOS using creationRequestForAssetFromImageAtFileURL/creationRequestForAssetFromVideoAtFileURL.
Thank you!
Thank you!
If the Photos framework is not in Delphi by default you can add it delphiworlds.com - Adding other iOS frameworks to the SDK manager Here is the iOS help for the function you want https://developer.apple.com/documentation/photokit/phassetchangerequest/1624059-creationrequestforassetfromimage?preferredLanguage=occ And here is some example code you can translate into Delphi https://stackoverflow.com/questions/26182974/save-a-big-batch-of-photos-using-the-new-photos-framework Mine the existing code http://docwiki.embarcadero.com/Libraries/Tokyo/en/FMX.MediaLibrary.Actions.TTakePhotoFromLibraryAction from there as well.
ReplyDeleteHi Eli M
ReplyDeleteThanks for the answer. I have already looked at all these links before, and I have tried to implement but I not manage. I get stuck on performChangesAndWait changeBlock implementation, I do not understand yet very clear how to implement it.
I forget about TTakePhotoFromLibraryAction, this is part of FMX.MediaLibrary where to add photos to the photo library it's using writeImageToSavedPhotosAlbum what is deprecated by Apple and in plus can't add videos.
ReplyDeleteRazvan Gheorghe Radu Yes, I think that is going to be the challenging part
ReplyDeleteMake a library in XCode and call it from Delphi?
ReplyDeleteEli M it's this possible?
ReplyDeleteraywenderlich.com - Creating a Static Library in iOS Tutorial https://stackoverflow.com/questions/33475512/using-3rd-party-framework-for-ios-in-delphi-firemonkey http://www.fmxexpress.com/libsox-audio-conversion-library-for-delphi-xe7-firemonkey-on-ios-windows-and-osx/
ReplyDeletethx Eli M I will look.
ReplyDelete