From a015f8f22f0c152230028031b25dc8b7bc51e6cf Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Wed, 18 Mar 2020 12:31:46 -0400 Subject: [PATCH] fix(ios): return error if Cancel is selected from Camera.getPhoto() prompt (#2550) --- ios/Capacitor/Capacitor/Plugins/Camera.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Capacitor/Capacitor/Plugins/Camera.swift b/ios/Capacitor/Capacitor/Plugins/Camera.swift index 5c6e7ae2f1..f086940d7d 100644 --- a/ios/Capacitor/Capacitor/Plugins/Camera.swift +++ b/ios/Capacitor/Capacitor/Plugins/Camera.swift @@ -111,7 +111,7 @@ public class CAPCameraPlugin : CAPPlugin, UIImagePickerControllerDelegate, UINav })) alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { (action: UIAlertAction) in - alert.dismiss(animated: true, completion: nil) + self.call?.error("User cancelled photos app") })) self.setCenteredPopover(alert)