1If you do not want to use any new package then use this
2
3
4import { Dimensions } from 'react-native';
5const {height, width} = Dimensions.get('window');
6const aspectRatio = height/width;
7
8if(aspectRatio>1.6) {
9
10 // Code for Iphone
11
12}
13else {
14
15 // Code for Ipad
16
17}
18
19this work fine for me
20
21