[英]How to retrieve the ios device screen resolution from the simctl command line
我正在尋找一種通過xcrun simctl
命令行檢索設備屏幕分辨率的方法。
我嘗試使用xcrun simctl list -j devicetypes
列出設備類型,但不幸的是分辨率沒有存儲在那里......
任何想法?
我通過挖掘找到了一種方法,感謝 CodeBender 解決方案,使用xcrun simctl io
以這種方式使用它(其中 UDID 是您想要的設備):
xcrun simctl io 80E6DAF5-A6EE-44F5-AAE6-561D58652C31 enumerate
它立即返回:
Port:
UUID: 246D47F3-7BDA-42DE-B511-0C1BD0C1EBCF
Class: Display
Port Identifier: com.apple.CoreSimulator.IndigoFramebufferServices.Display
Power state: On
Display class: 0
Default width: 640
Default height: 1136
Default pixel format: 'BGRA'
Display rotation:
Angle = 0 radians
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.