How to get iPad model number programmatically

Please provide me the API to read iPad/iPhone Model Number programattically.


Model number (on the back cover):
A1670 on the iPad Pro
A1671 on the iPad Pro Wi-Fi + Cellular


Thanks,

Saravanan

You'll need to start with a device idiom, then translate it's output to model.


Assuming the reason you want to do this is allowed, see:

https://stackoverflow.com/questions/24059327/detect-current-device-with-ui-user-interface-idiom-in-swift

How to get iPad model number programmatically
 
 
Q