How to check device id of iPhone simulator?

前端 未结 8 1317
耶瑟儿~
耶瑟儿~ 2020-12-24 05:16

I want to check device id for my iPhone simulator application. But not using codebase. I know the way how to do with codebase, using UIDevice instance.

Is there any

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-24 05:57

    As so often, there is a Xcode terminal tool for that (part of the Xcode tools) see xcrun manpage

    xcrun simctl list | egrep '(Booted)'
    

    lists only all booted (could be more than one) Simulators (remove | egrep '(Booted)' to see them all).

    UIID results like

     iPhone 6 Plus (AAAABD40-9DE6-44B7-A4EA-B34ABCDEFCA6) (Booted)
    

    you can then lookup a folder in ~/Library/Developer/CoreSimulator/Deviceson your Mac and find all the "belongings" of that particular Simulator

提交回复
热议问题