1

You can get the model identifier of an iOS device using the uname system call, as described in several answers here on Stack Overflow (such as this one).

If you're running in the simulator, this will tell you the architecture of your computer. Is there any way of finding out the model it is simulating?

skagedal
  • 2,323
  • 23
  • 34

1 Answers1

1

Check the environment variable SIMULATOR_MODEL_IDENTIFIER. This returns the same value you would see on the equivalent physical device. For example on the iPhone 6 Plus simulator it will be "iPhone7,1".

russbishop
  • 16,587
  • 7
  • 61
  • 74