Questions tagged [phphotolibrary]

The PHPhotoLibrary framework provides interfaces for viewing, editing and creating assets and collections managed by the IOS Photos app.

196 questions
0
votes
1 answer

How do I get the creation date and time of a AVURLAssett objective-c

I have an app where I am picking a video from a photo library and I want to get the date and time it was created (and if possible the location it was taken) from its metadata so I can use it for some labeling. I can do it for an image picked from…
user1114881
  • 731
  • 1
  • 12
  • 25
0
votes
1 answer

How to get the byte[] of the photo in Xamarin.iOS

I'm developing a photography software in Xamarin.iOS. I'm using the PHPhoto class. When I take a photo, I'm trying to send it to the web. I plan to send them in byte[]. Where can I get the data for the photo in the DidFinishCapture method? When I…
user6467483
0
votes
1 answer

Unable to Save UIImage to Camera Roll in Swift 5 XCode 11.6

I am trying to save generated UIImage to Camera Roll. I have necessary privacy string in Info.plist. I tried couple of methods; The error I am facing for PHPhotoLibrary is Error Domain=com.apple.accounts Code=7 "(null) The codes I have…
erdemgc
  • 1,701
  • 3
  • 23
  • 43
0
votes
1 answer

How do I show/hide a view with SwiftUI based on PHPhotoLibraryAuthorizationStatus?

I'm trying to get a view to show in SwiftUI if the user has not given permission for access to the PhotoLibrary (Giving them instructions to allow access to the Photo Library, either with a prompt or to go into Settings and fix the status). Now I'm…
Louis Cremen
  • 764
  • 7
  • 12
0
votes
2 answers

How do I mark an image as Favorite in my app

I have an array of images and I have three buttons ( Save, Favorite, Share) each image in a collectionviewcell. How do I mark an image as my favorite image? And I would like to display the marked images in a folder inside my app. Thank you! import…
NelsonDharu
  • 63
  • 1
  • 7
0
votes
1 answer

Is there a way to check whether NSPhotoLibraryAddUsageDescription permission was granted or denied?

I have an application that should save a picture to the Photo library if permission is granted and if not, it should write to another folder in the app sandbox. I do not need read access on the photo library, so I tried adding the…
dieterdreist
  • 159
  • 1
  • 8
0
votes
0 answers

When I call request permissions to PHPhotoLibrary in the UIActivityViewController it calls twice

I created UIActivityViewController and check which share type is select. I need to save in my photo library and I check .saveToCameraRoll. If I don't call PHPhotoLibrary.requestAuthorization in the activityVC.completionWithItemsHandler then it…
Rustam Khisamov
  • 151
  • 1
  • 4
  • 8
0
votes
1 answer

AVAssetWriter metadata Date issue

I have the following code to write the date metadata in AVAssetWriter which is going all wrong in iOS 13. Need to know if this is an iOS 13 bug or I am doing something wrong. private var metadataItems:[AVMetadataItem]? { get { …
Deepak Sharma
  • 5,577
  • 7
  • 55
  • 131
0
votes
0 answers

Is it possible to delete the last photo in my photo library using swift

I'm trying to get the last image from my photo library and delete it. There are answers on getting the last image and answers to delete an image using its URL, but I find it difficult to consolidate both var images:[UIImage] = [] func…
Tochukwu
  • 190
  • 1
  • 11
0
votes
1 answer

How can i save a video to the camera roll with a specific date?

I save the video to the end of the camera roll PHPhotoLibrary.shared().performChanges({ PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: mergedVideoFile!) }) { saved, error in if saved { print("saved") } }
0
votes
0 answers

How to get Asset URL when using PHPhotoLibrary to save image and video?

My code used ALAssetsLibrary to save image and video to iOS gallery. But Xcode tells me that ALAssetsLibrary is deprecated as of iOS 9.0, and advise me to use PHPhotoLibrary instead. With the old ALAssetsLibrary, I get an Asset URL after saving,…
NeoWang
  • 17,361
  • 24
  • 78
  • 126
0
votes
1 answer

Is there a way to control the sort order when you create a new album to save images onto photo library?

Summary: Is there a way to control the sort order for an album created by an app on a users device? I would like an album I created to sort by date, but it sorts by download order. Details: I am using the function save() below to save a UIImage to…
Daniel Patriarca
  • 361
  • 3
  • 20
0
votes
0 answers

How to Programmatically make permission .denied the PhotoLibrary Authorization

In my app I have a Settings section which should be able to handle the app-privacy the same as the iOS settings does (using on/off switches). I know how to gain authorization for photo library but is there a way to change the permission to .denied…
Lahiru Pinto
  • 1,621
  • 19
  • 20
0
votes
1 answer

Checking for Privacy - Photo Library Additions Usage Description only in iOS

My app only needs the 'Privacy - Photo Library Additions Usage Description' property in the plist file (app writes to Photo library, but doesn't read). I use this code to check for permissions: PHPhotoLibrary.requestAuthorization { status in …
Lena Verhoev
  • 231
  • 1
  • 3
  • 15
0
votes
1 answer

The horizontal orientation of "orientation = 6" that has been metadata-edited to the camera roll can not be saved

I am trying to edit the metadata of the camera roll photo. However, if you try to overwrite the photo after editing the metadata, always giving me the following error: 'Error Domain=NSCocoaErrorDomain Code=-1 "The operation couldn't be completed.…