Show device name for iOS Simulator

grigory.entin's Avatar

grigory.entin

15 Aug, 2018 02:36 PM

Currently "the app switcher" shows just " iOS Simulator ()" for every "available" app, and if I run same app in two different simulators (and same iOS version), there's basically no way to tell what is what - the only workaround is to use different versions of iOS for simulator, but that's not always possible.

  1. Support Staff 1 Posted by Vlas Voloshin on 17 Aug, 2018 12:38 AM

    Vlas Voloshin's Avatar

    Hi Grigory,

    This is indeed a great suggestion – we did receive a similar one some time ago. In fact, this problem became more prominent with Xcode 9's full support of multiple simulators launched at the same time. Unfortunately, since iOS doesn't report the same simulator name via UIKit as Xcode does, it might be tricky (though not impossible) to extract the names you'd expect to see, so I can't promise you any particular timeframe when this feature would be implemented. But we'll definitely look into it, thanks for your feedback!

    Best regards,
    Vlas.

  2. 2 Posted by grigory.entin on 17 Aug, 2018 07:10 PM

    grigory.entin's Avatar

    Hi, I believe you can get the simulated model from process environment like below:

    (lldb) po NSProcessInfo.processInfo.environment[@"SIMULATOR_MODEL_IDENTIFIER"]
    iPhone6,1
    
    Credits to https://github.com/sag333ar/SKDeviceType/blob/master/Device/DeviceT...
  3. Support Staff 3 Posted by Vlas Voloshin on 18 Aug, 2018 07:05 AM

    Vlas Voloshin's Avatar

    Hi Grigory,

    Thanks for the tip – this looks like a great idea! In fact, it turns out simulator environment contains a few more useful variables, and a somewhat more sustainable and precise option for us would be to use SIMULATOR_DEVICE_NAME, since it contains a human-readable device name and doesn't require to keep Model ID mapping up to date.

    I'll include this information in our internal task list, and hopefully this solution will make implementing this feature much more feasible.

    Best regards,
    Vlas.

  4. 4 Posted by grigory.entin on 18 Aug, 2018 11:21 AM

    grigory.entin's Avatar

    Great! Thanks a lot!

  5. Support Staff 5 Posted by Vlas Voloshin on 03 Nov, 2018 06:26 AM

    Vlas Voloshin's Avatar

    Hi Grigory,

    Just wanted to let you know that in Reveal 19 Simulator device names are now displayed in the inspectable applications list and the connection bar, like you've suggested. You can learn more about the update in our blog. Thanks for helping us implement this feature!

    Best regards,
    Vlas

  6. Vlas Voloshin closed this discussion on 03 Nov, 2018 06:26 AM.

  7. grigory.entin re-opened this discussion on 03 Nov, 2018 11:33 AM

  8. 6 Posted by grigory.entin on 03 Nov, 2018 11:33 AM

    grigory.entin's Avatar

    Ah, cool! Thanks a lot, guys!

    Regards,
    Grigory

  9. Vlas Voloshin closed this discussion on 03 Nov, 2018 01:35 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac