How to get maximum x and y coordinate value in iOS device with Java-Client 7.3.0

How do we retrieve maximum X and Y coordinates of any iOS device using Java with Appium ?