react-native-unity-view icon indicating copy to clipboard operation
react-native-unity-view copied to clipboard

iOS has big issue with v1.3.3

Open ziyoshams opened this issue 5 years ago • 2 comments

It took me a while to realize this. But here is my story.

My app has a bottom tab navigation which the first tab is the AR (unity) view, and other tabs contain regular social-media type stuff. At some point during our development we notices that our Action Sheets and Alerts don't pop up on iOS. This happened when we upgraded all the packages including React Native and it was not obvious what was causing the issue. After several days of debugging, we came to conclusion that [email protected] was to blame.

Here are two images to illustrate the issue: Note: unity view size is intentional to illustrate this problem .

Image 1: It illustrates that Action Sheet is displayed in the context of unity-view, which is wrong. Actions Sheets are accessible from anywhere and they have a priority over other views. When navigating to a different tab, no Action Sheet or Alert will show, because they all live in the context of unity-view.

Image 2: On image2, I opened a camera to take a photo, and you can see that it lives in unity-view. natural behavior of a camera is like a Modal. It should pop up and disappear in full width and height.

Just to emphasize, the issue is that Alerts and Action Sheets are not accessible if you have other windows in your navigation.

unity-issue

What did we do to solve this? We just downgraded to version 1.1.3 which does not have this issue.

ziyoshams avatar May 13 '19 21:05 ziyoshams

@ziyoshams can confirm this issue. In our case, we had been planning on designing our own custom alert boxes anyway. So we did that and have been avoiding using Alert since. Would be great to have a fix, though.

If anyone has time, it would be worth investigating how RNUV stacks against RN and other system interfaces. This might be a good starting place:

https://github.com/f111fei/react-native-unity-view/blob/master/ios/UnityUtils.mm#L147

benjarwar avatar Dec 03 '19 16:12 benjarwar

@benjarwar Thanks for quick response. Sometimes I wish I knew how native code works 😄 But, thats a good point to start investigating. Will update if I find something.

ziyoshams avatar Dec 03 '19 17:12 ziyoshams