Example : iPad pro 3rd generation onward due to introduce bottom black bar notch. Not exist in iPad pro 1st and 2nd generation. All four generation has same resolution. 1024 X 1366 if i fixed for this resolution it will impact 1st and 2nd generation.
if(Ti.Platform.displayCaps.platformHeight === 1366){
}
This code cause issue to other iPad pro generation.
Titanium provides platform-identification properties in the Ti.Platform namespace that you can use for conditional branching within your code.
if used
Ti.Platform.model
its return model values, but it has some mapping to understand which model exactly. https://docs.appcelerator.com/platform/latest/#!/api/Titanium.Platform-property-modelFollowing are mapping list :
Reference for this : How to get device make and model on iOS?
We can write code to detect model like :
when running on virtual device or simulator in xcode its return like "iPad8,5 (Simulator)" and when actual device it returned "iPad8,5"
This property not only related to iOS, its for all type of devices. I have mentioned only iOS specific.
Help done by @miga
Updated list can be found here : https://www.theiphonewiki.com/wiki/Main_Page https://gist.github.com/adamawolf/3048717
Step to get device Id :
Click on device -> go to respective page