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
0 answers

Problem Updating "Limited Library" Selection with PHPickerViewController With Choice "Select Photos"

Context: I'm building an app where a user can select Screenshots from their Photos Library, and display them in a more organized manner. These images are not saved to a database, but instead are simply fetched back from the Library (using…
0
votes
1 answer

Problem using a PHAssetCreationRequest to include .adjustment data

I'm trying to add image assets to a Photo Library, using a PHAssetCreationRequest. I can add photos, videos and live photos but I'm also trying to include adjustment data (in the form of AAE files). Here is my code (for adding still images): func…
psb
  • 89
  • 5
0
votes
0 answers

Duplicate file name when trying to save same image twice to Photo Library

I am trying to save an image to the user's photo library using PHPhotoLibrary and set the image file name at the time of saving the code below. This is working the first time, but if I then try to save the same image again with a different file…
0
votes
0 answers

UIImagePickerController - Remember last album

My app allows users to pick images from Photo Library. I use UIImagePickerController for this. User may want to pick image from nested folders and finaly from particular album. When user wants to pick another image again, the odds are good they will…
Michal.Jan008
  • 135
  • 11
0
votes
0 answers

How to store arbitrary metadata in a photo saved using the Photos library?

The app takes pictures. Then is meant to save those pictures using the below code in the delegate method: public func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) { // Abort…
shoe
  • 952
  • 1
  • 20
  • 44
0
votes
2 answers

Is request permission require for using PHPickerViewController & UIImagePickerController?

I have some confusion about permission with using PHPickerViewController & UIImagePickerController. Do I have to request permission for using it ? (Currently, I open it without request permission but It's working.) Is it acceptable for upload to app…
0
votes
0 answers

Swift: Save image with file name using PHPhotoLibrary and PHAssetCreationRequest

I am trying to save an image to the user's photo library using PHPhotoLibrary and set the image file name at the time of saving suing the code below. This is working the first time, but if I then try to save the same image again with a different…
Tom Coomer
  • 6,227
  • 12
  • 45
  • 82
0
votes
2 answers

Saving large videos in iOS

I am trying to save a large video locally to the photo library using PHPhotoLibrary but i notice that it takes a very long time is there any way to get progress or even better to make the process faster my code: func saveToLibrary(videoURL: URL,…
sapir1126
  • 21
  • 1
0
votes
0 answers

In which situation adding a new video asset to the Photos library fails?

I'm working on an iOS app that allows users to save the captured video on their iOS devices. After some research, now I'm able to save the video on the device, but I was wondering what kind of situation the app fail to save the video. In the…
Yuuu
  • 715
  • 1
  • 9
  • 32
0
votes
0 answers

PHPhoto localIdentifier to cloudIdentifier conversion code improvements?

The two conversion methods below for mapping between the PHPhoto localIdentifier to the corresponding cloudIdentifier work but it feels too heavy. Do you have suggestions on how to rewrite to a more elegant (easier to read) form? The sample code in…
0
votes
1 answer

Present to the user limited library for state PHAuthorizationStatusLimited

Trying to use the following code when PhPhoto status is PHAuthorizationStatusLimited PHAuthorizationStatus prevStatus = [PHPhotoLibrary authorizationStatus]; if (prevStatus == PHAuthorizationStatusLimited) { [PHPhotoLibrary…
stefanosn
  • 3,264
  • 10
  • 53
  • 79
0
votes
0 answers

Running iOS app in the background without user interaction

Hey all I’m new to the world of Xcode and building apps. I am wondering if it were possible to have an app run in the background and have it listen to the photos library and if it finds a new photo has been added it would automatically upload that…
StealthRT
  • 10,108
  • 40
  • 183
  • 342
0
votes
3 answers

Correctly set the right picture orientation when shooting photo

On my iOS app written in Swift I need to take pictures and save them on gallery; as Apple documentation, all the pictures are taken in landscape also if the phone is in portrait; if we save the picture as-is it will be saved 90° rotated. The…
Francesco Piraneo G.
  • 882
  • 3
  • 11
  • 25
0
votes
0 answers

iOS Photo Library - image orientation change

How can I change orientation property (to avoid re-encoding upon rotation) on image stored in iOS Photo Library ? I was trying to search for corresponding method or propery on PHAsset (where I'd expect it), but with no luck.
Michal.Jan008
  • 135
  • 11
0
votes
2 answers

Get video metadata, how to detect whether the video is taken from front- or back-camera

I want to know whether is video is taken from the front or back camera. As info return nil. let asset: PHAsset! let manager = PHImageManager.default() if asset.mediaType == .video { let options: PHVideoRequestOptions =…
Prashant Ghimire
  • 518
  • 4
  • 20