Questions tagged [phpickerviewcontroller]

70 questions
12
votes
1 answer

How can i display only limited photos with PHPickerViewController?

I use Limited Photos Library feature and have selected a few photo but when use PHPickerViewController to select images in the application, PHPickerViewController shows all images in the gallery instead of just a few selected ones before. Is it…
suzu
  • 121
  • 4
11
votes
4 answers

PHPickerViewController tapping on Search gets error... "Unable to load photos"

I'm trying to implement a PHPickerViewController using SwiftUI and The Composable Architecture. (Not that I think that's particularly relevant but it might explain why some of my code is like it is). Sample project I've been playing around with this…
Fogmeister
  • 76,236
  • 42
  • 207
  • 306
8
votes
1 answer

How to use PHAuthorizationStatusLimited in iOS 14

In order to fetch photo's creationDate, so use requestAuthorizationForAccessLevel before show PHPickerViewController. PHAccessLevel level = PHAccessLevelReadWrite; [PHPhotoLibrary requestAuthorizationForAccessLevel:level…
Mr.Laity
  • 133
  • 1
  • 8
7
votes
2 answers

Getting video data nil when user tries to retrieve video using PHPickerViewController with selected photos permission in IOS 14, swift 5

In iOS 14 Apple has introduced PHPickerViewController where user has access to provide permission to all photo library videos or selected videos. In first case when we provide permission to all videos, we are able to get videos from photo library…
Heena
  • 79
  • 2
7
votes
1 answer

How to modify the appearance of PHPicker

I have a problem with the new PHPicker on iOS 14. When my app request for photo library authorization, the system will prompt the user with three options, and if the user selects "select photos", the system will present a PHPicker in which the user…
Mani
  • 71
  • 1
6
votes
2 answers

Getting a PAMediaConversionServiceErrorDomain error 2 when importing an image using a PHPickerViewController

I got this message when trying to import an image using a PHPickerViewController: 2022-10-29 12:52:17.775185+0200 screenfreeze[38500:5423936] [claims] 2AA2E9DE-9603-4723-B04C-35F09BB99667 grantAccessClaim reply is an error: Error…
Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
6
votes
3 answers

UIImage must conform to _ObjectiveCBridgeable in PHPickerViewControllerDelegate callback

I have reviewed the WWDC2020 video explaining how to adopt the new PHPickerViewController API. I have also seen several blogs showing exactly the following code. func picker(_ picker: PHPickerViewController, didFinishPicking results:…
user15147284
6
votes
0 answers

How to display current selected photos when presenting a PHPickerViewController manually?

Is there a way to show the user's current photo selections when presenting a PHPickerViewController manually? For example, when using the following code the picker doesn't show any of the user's currently selected photos. var pickerConfig =…
JKo
  • 1,260
  • 1
  • 10
  • 18
5
votes
0 answers

PHPickerViewController hide Search Bar and Navigation Bar

I've been trying to implement a photo selection feature in a new app. My current approach is to use a PHPickerViewController embedded in a UIViewControllerRepresentable to display in a swiftUI view. This is my makeUIViewController function. func…
Titouan
  • 531
  • 4
  • 13
5
votes
2 answers

iOS 14 NSItemProvider loadDataRepresentation() returns nil data for specified types

Setup: I am using PHPickerViewController to allow the user to select photos. I've implemented the PHPickerViewControllerDelegate protocol method picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]). I am getting the…
jbjohnny
  • 59
  • 2
5
votes
1 answer

How to retrieve PHAsset from PHPicker?

In WWDC20 apple introduced PHPicker - the modern replacement for UIImagePickerController. I'm wondering if it's possible to retrieve PHAsset using the new photo picker? Here is my code: private func presentPicker(filter: PHPickerFilter) { var…
Hamid Yusifli
  • 9,688
  • 2
  • 24
  • 48
3
votes
2 answers

PHPickerViewController's Cancel Button is not working in iOS 15

I am using PHPickerViewController to pick Image for User Profile Picture Purpose in iOS 15. I am using UIKit framework. I have the following code: var pickerConfig = PHPickerConfiguration(photoLibrary: .shared()) pickerConfig.selectionLimit =…
Kris2k
  • 275
  • 2
  • 12
3
votes
1 answer

Replacing default images in a collection view with user selected photos- swift

So I have a collection view that populates three default images on each cell. The user can select images through the new PHPicker, what I want to accomplish is to replace default images with selected photos, so the first selected image should…
3
votes
3 answers

How to get WebP images from gallery with PHPicker

I have a PHPIckerViewController which is available since iOS 14. And I want to get image from gallery which is format WEBP. But item provider in PHPicker can't load image with this format. Please tell me how can I pick and set image on UIButton with…
IlyaNester
  • 79
  • 5
3
votes
0 answers

Seeing memory leaks from PHPickerViewController

I've recently integrated the PHPickerViewController per Apple's recommendation for accessing photos within your app. However, testing for memory leaks, I've noticed the picker is producing many memory leaks. I'm running the PHPickerDemo and see…
1
2 3 4 5