Unable to look up screen scale and Unexpected physical screen orientation in Xcode 10

后端 未结 7 1166
梦毁少年i
梦毁少年i 2020-12-23 09:15

I have recently updated Xcode to version 10, and now my console displays:

MyApp[1618:133310] [AXMediaCommon] Unable to look up screen scale
MyApp[1618:133310         


        
相关标签:
7条回答
  • 2020-12-23 09:52

    I got the issue, when I was running on iOS 12.2 and MacOS Majove (Version 10.14.4) Just change to iOS 11.4 and everything working perfectly.

    0 讨论(0)
  • 2020-12-23 09:57

    I've met the same problem. Finally I find out that this is because I accidentally resize the simulator's screen using my mouse cursor. By quiting and restarting the simulator my problem is solved.

    Hope the aforementioned information helps.

    0 讨论(0)
  • 2020-12-23 10:02

    It could sounds dummy, but these warning appeared me after move the simulator previously rendered from the Macbook screen, to a wider external screen.

    I solved it just restarting the simulator in the external screen. My 2 cents.

    0 讨论(0)
  • 2020-12-23 10:05

    I encountered this issue after running some UITest from a gitlab-runner.

    The simulator got into this state and the only way to solve it was to go to Hardware -> Erase all content and settings

    0 讨论(0)
  • 2020-12-23 10:07

    This won't answer your original question, but it might relieve your eyes. A caveat to this answer however is that it disables all NSLog statements.

    Do the following to suppress - all NSLog statements including - the warning: Unable to look up screen scale:

    In Xcode, go to Product - Scheme - Edit Scheme, select 'Run' on the left side ...

    ... and add OS_ACTIVITY_MODE with value "disable" in the Environment variables section.

    0 讨论(0)
  • 2020-12-23 10:15

    Resizing the simulator's screen size to actual device size resolved this for me:

    Cmd+1 is the shortcut.

    0 讨论(0)
提交回复
热议问题