Skip to content

Conversation

gaearon
Copy link
Contributor

@gaearon gaearon commented Dec 19, 2024

Fixes #1631

If the controller is being dismissed, we shouldn't be presenting from that controller.

Test Plan

No longer getting

[UIKitCore] Attempt to present <TOCropViewController: 0x104840200> on
<PHPickerViewController: 0x12bf0ece0> (from <PHPickerViewController: 0x12bf0ece0>) whose
view is not in the window hierarchy.

when trying to present the cropper right after the Expo image picker.

See the video in bluesky-social/social-app#7194 to show the interaction. Before the fix, we were getting that log and the cropper would not show up.

@adrian-koczen
Copy link

I tried this fix and it works on iPhone 15 pro & iPhone 8 plus, but for some reason on iPhone 7 not.

@asnaseer
Copy link

We were getting this issue when we upgraded from Expo 51 (RN 0.74) to Expo 52 (RN 0.76). We created a patch based on this PR and that fixed it for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

openCropper is not working for IOS: view is not in the window hierarchy
3 participants