Post

Replies

Boosts

Views

Activity

Reply to [PHPicker] Permission error followed by "no such file" error
Same error when I try to load every image which was not previously loaded by this app : [ERROR] Could not create a bookmark: NSError: Cocoa 257 "The file couldn’t be opened because you don’t have permission to view it." Picker delegate : public func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) { 				picker.dismiss(animated: true) 				for result in results { 						let provider = result.itemProvider 						if provider.canLoadObject(ofClass: UIImage.self) { 								provider.loadObject(ofClass: UIImage.self) { [weak self] image, error in 										DispatchQueue.main.async { 												guard let self = self, let uiImage = image as? UIImage else { return } 												// Do something with 'uiImage' 										} 								} 						} 				} 		} The error is displayed when this part of code is called : let uiImage = image as? UIImage I don't have the error on the simulator, only on real device. Configuration : Xcode 12.0.1 iPohne XS Max 14.0.1
Oct ’20