xcodeios-simulatoriphone-8

What is the point of the iPhone 8 simulator?


When it comes to simulator features what would be different between the iPhone 7 and the iPhone 8 simulators beside the device id? Why did Apple include both in Xcode?


Solution

  • You're unlikely to get an authoritative answer to any "why did Apple..." questions here — Apple as a corporate entity doesn't post to SO.

    There aren't really notable simulator features different between iPhone 6, 6s, and 7, nor between the two generations of iPad Pro 12.9" hardware, nor between the various iPhone Plus models, etc. For the past few years of major Xcode releases, they've just included / let you create device-specific simulators for every supported device regardless of whether there's any meaningful difference between those devices at the level Simulator implements. (Of course there are lots of hardware differences that are outside the scope of Simulator, like Metal feature sets or camera features.)

    Back before they started having device-specific Simulator profiles (around the time of Xcode 6, IIRC?), Simulator offered a smaller set of profiles mapping to the significant differences in screen geometry — e.g. iPhone 3.5", iPhone 3.5" retina, iPhone 4" retina, iPhone 4.7" retina, iPad, iPad retina, etc.

    One issue with that, and a possible reason why Apple changed course, is that the increasing variety and history of Apple devices makes it harder to keep track of what's what in your head. (Okay, I want to see how my app works on iPhone 5s now. What screen size was that?) Another might be that UI size hasn't been directly tied to device size since 2014, where iPhone 6 and 6 Plus (and their successors) have offered a zoomed UI mode (which IIRC is also in Simulator).

    Another issue is that there are device differences that don't map to screen differences, like 64-bit support (not that running a 64-bit app as an x86_64 binary in simulator is much like running an arm64 binary on a device, but it's a first approximation), Touch ID (which the simulator provides a proxy for), etc. And (as @russbishop's answer notes) the simulator also makes sure that APIs like uname return realistic values (like iPhone10,1 for iPhone 8) rather than a fictional simulated device.

    If you'd rather cut down your set of available simulator targets in Xcode to only those that offer significant screen geometry differences, feel free to visit the Devices and Simulators window and delete/rename to your heart's content. For iOS 11 you could cut down to just iPhone 5s/SE/iPod Touch 6th gen, iPhone 6/6s/7/8, iPhone Plus, iPhone X, and three sizes of iPad screen, getting you eight different run destination instead of the default seventeen.