Post

Replies

Boosts

Views

Activity

PHPickerViewController - can't get URL from PHPickerResult
Hi, I have a little issue with this new API PHPPickerViewController:  var configuration = PHPickerConfiguration()  configuration.filter = .any(of: [.images])  configuration.selectionLimit = 10  configuration.preferredAssetRepresentationMode = .compatible let picker = PHPickerViewController(configuration: configuration)  picker.delegate = self  present(picker, animated: true, completion: nil) func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {   var selectedPhotosData : [Data] = []   for (index,result) in results.enumerated() { 				 result.itemProvider.loadFileRepresentation(forTypeIdentifier: "public.jpeg") { (url, error) in     guard let fileUrl = url else {return } print(fileUrl)      } } This code above doesn't work, I don't get the URL at all. I tried on Simulator and real device but the same problem. I tried loadObject function but I can't the UIImages... I saw some workarounds here but they don't work in my case it seems...
3
0
3.5k
Jan ’21