Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ public class ActionSheetPlugin: CAPPlugin, CAPBridgedPlugin, UIAdaptivePresentat

DispatchQueue.main.async { [weak self] in
if let alertController = self?.implementation.buildActionSheet(title: title, message: message, actions: alertActions) {
self?.setCenteredPopover(alertController)
// On iPhone, an anchored action sheet shows as a popover without its Cancel action (iOS 26+).
// Without a Cancel action, keep the popover: tapping outside it cancels.
if UIDevice.current.userInterfaceIdiom != .phone || !hasCancellableButton {
self?.setCenteredPopover(alertController)
}
self?.bridge?.viewController?.present(alertController, animated: true) {
if !hasCancellableButton {
self?.setupCancelationListeners(alertController, call)
Expand Down
4 changes: 3 additions & 1 deletion camera/ios/Sources/CameraPlugin/CameraPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,9 @@ private extension CameraPlugin {
alert.addAction(UIAlertAction(title: settings.userPromptText.cancelAction, style: .cancel, handler: { [weak self] (_: UIAlertAction) in
self?.call?.reject("User cancelled photos app")
}))
self.setCenteredPopover(alert)
if UIDevice.current.userInterfaceIdiom != .phone {
self.setCenteredPopover(alert)
}
self.bridge?.viewController?.present(alert, animated: true, completion: nil)
}

Expand Down