Check out example codes for "are the iphone dimensions widht then height". It will help you in understanding the concepts better.

Code Example 1

Name:   iPhone X
Size:   (375.0, 812.0)
Scale:  3.0
Native: (1125.0, 2436.0)

Name:   iPhone XR
Size:   (414.0, 896.0)
Scale:  2.0
Native: (828.0, 1792.0)

Name:   iPhone XS
Size:   (375.0, 812.0)
Scale:  3.0
Native: (1125.0, 2436.0)

Name:   iPhone XS Max
Size:   (414.0, 896.0)
Scale:  3.0
Native: (1242.0, 2688.0)

Learn ReactJs, React Native from akashmittal.com