Questions tagged [phpicker]

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

LazyVGrid, List, LazyStacks don't release views from memory?

I'm playing around with the new photo picker in SwiftUI 2 and I made a simple app to show the imported images in a LazyVGrid but when scrolling down, if I imported around 150 images the app finish all the memory and it crashes (Terminated due to…
Ludyem
  • 1,709
  • 1
  • 18
  • 33
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
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
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
2
votes
0 answers

PHPicker Load Video

I'm trying to figure out how to load videos with PHPicker. I know how to do it with Images but I can't seem to figure out how to do it with videos. This code works only with some videos and not with others. Here's my code struct MediaPicker:…
blueskies
  • 43
  • 2
  • 7
2
votes
0 answers

Show picker view with user selected photos only

iOS 14 introduced the new PHPicker where users can select which photos the app is allowed to access the assets. How can I present the picker view with only the allowed photos visible.
jfredsilva
  • 1,434
  • 1
  • 9
  • 15
2
votes
2 answers

How to load raw image using PHPicker in iOS programmatically?

I can load normal images: public.image types. The Apple proRaw(adobe raw image type: DNG format) can be used in iPhone 12 series. So, I captured with RAW image and I want to load the DNG file from app. But I can't load the image using…
strawnut
  • 359
  • 5
  • 21
2
votes
1 answer

Is this the proper way to use PHPicker in SwiftUI? Because I'm getting a lot of leaks

I am trying to figure out if my code is causing the problem or if I should submit a bug report to Apple. In a new project, I have this code: ContentView() import SwiftUI struct ContentView: View { @State private var showingImagePicker =…
Rillieux
  • 587
  • 9
  • 23
1
vote
0 answers

iOS 16.0 - PHPicker issue with PHPickerConfiguration config.selection = .people

I'm facing issues on 16.0 using PHPickerViewController with PHPickerConfiguration config.selection = .people. The PHPicker screen shows an error "Unable to Load Photos". Xcode 14.0.1. import UIKit import PhotosUI class ViewController:…
1
vote
1 answer

PHPicker can't load selected image to UIButton

I created a UIButton programmatically Which can pick profile photo. So I made image picker with PHPicker, and it shows well. But after I selected image, it doesn't show on the button. I thought the original photos could be the problem. But it's the…
LEE
  • 13
  • 3
1
vote
0 answers

PHPicker result(s) incomplete

SwiftUI novice here. My PHPicker results show a weird behaviour. Whether I pick one image or several, often the result is empty for a single image or incomplete if multiple images are picked. Oddities: every image that is missing from a PHPicker…
1
vote
1 answer

Swift: How to handle video and photo results from a PHPicker?

I need the ability for a user to select multiple photos and videos from there photo library. (Using PHPicker) I already know how to get images with this: func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) { …
Trevor
  • 580
  • 5
  • 16
1
vote
3 answers

iOS 14: PHPickerViewController is there any way to load all assets at the same time PHPickerResult

Currently, I am trying to dive into PHPickerViewController for select multiple image at same time from Photos. so I want to array of image that selected by user, i tried it too many way but no luck. This is my code please tell me there is an best…
1
2