Unable to reach a pop up using Appium

There is a pop-up in the screen that I want to close. The pop up is here:
popup
But Appium does not recognize the pop-up as you can see in the screnshoots.

It finds the elements beside the pop-up. I don’t want to click by location. Because this scenario runs in the different devices with different sizes. Is there any way to achieve that pop-up? Is this a bug of Appium?

I’ve come across this before If you can use UIautomatorviewer and take a screenshot using that software. I think Appium compresses the hierarchy of the elements, that why you can’t see it. (I could be wrong)

Try the solution from Android System UI testing with appium

Hi, any solution for iOS? Seems I have the same issue but for iOS.