Skip to content

Conversation

@philprime
Copy link
Member

@philprime philprime commented Nov 28, 2025

I used this sample to investigate #6104. I believe it is benefical to keep it around.

#skip-changelog

Closes #6925

@philprime philprime self-assigned this Nov 28, 2025
@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Nov 28, 2025
@github-actions
Copy link
Contributor

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6a2c545

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +435 to +439
extension ExtraViewController: PHPickerViewControllerDelegate {
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
// noop
}
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: PHPickerViewController is not dismissed in picker(_:didFinishPicking:), blocking user interaction.
Severity: CRITICAL | Confidence: High

🔍 Detailed Analysis

The PHPickerViewController presented by showGalleryUIAction(_:) is not dismissed after the user selects an image or cancels. The picker(_:didFinishPicking:) delegate method, which is required to dismiss the picker according to Apple's documentation, is implemented as a no-op, causing the picker to remain visible and block further app interaction.

💡 Suggested Fix

Add picker.dismiss(animated: true, completion: nil) inside the picker(_:didFinishPicking:) delegate method to properly dismiss the PHPickerViewController.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: Samples/iOS-Swift/iOS-Swift/ExtraViewController.swift#L435-L439

Potential issue: The `PHPickerViewController` presented by `showGalleryUIAction(_:)` is
not dismissed after the user selects an image or cancels. The
`picker(_:didFinishPicking:)` delegate method, which is required to dismiss the picker
according to Apple's documentation, is implemented as a no-op, causing the picker to
remain visible and block further app interaction.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 4210419

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds relevant

<rect key="frame" x="0.0" y="0.0" width="320" height="411"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillProportionally" alignment="center" id="DsI-9S-jdi">
<rect key="frame" x="0.0" y="0.0" width="320" height="190.5"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You changed the default device right? I think many of the changes here come from that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(samples): Add button to display gallery picker

4 participants