react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

Fix image crop modal failing to show

Open gaearon opened this issue 11 months ago • 2 comments

Fixes https://github.com/ivpusic/react-native-image-crop-picker/issues/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 https://github.com/bluesky-social/social-app/pull/7194 to show the interaction. Before the fix, we were getting that log and the cropper would not show up.

gaearon avatar Dec 19 '24 21:12 gaearon

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

adrian-koczen avatar Jan 10 '25 15:01 adrian-koczen

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.

asnaseer avatar Apr 28 '25 16:04 asnaseer