gpt4 book ai didi

ios - 界面测试失败 : Failed to update to requested orientation

转载 作者:搜寻专家 更新时间:2023-10-30 22:17:23 24 4
gpt4 key购买 nike

在持续集成下有时会出现这样的错误(貌似是随机错误):

Test Assertion UI Testing Failure - failed: Failed to update to requested orientation.

enter image description here

在测试时,设备旋转到横向模式并且...它不会返回到纵向模式。为什么?

您知道可能导致此类问题的原因吗?

在代码中我有一行:

XCUIDevice.shared().orientation = .landscapeLeft
XCUIDevice.shared().orientation = .portrait

貌似跟下面的部分代码有关,但是不知道怎么解决。

感谢任何帮助。

enter image description here

最佳答案

基本上没有什么可以解决的,这是一个 Xcode 8 错误。当您收到此错误时,只需重新运行 atm 即可。我在 Xcode 7 上从未遇到过这个问题。错误消息告诉你的是它未能获得请求的方向并且你的代码行看起来不错:

XCUIDevice.shared().orientation = .landscapeLeft
XCUIDevice.shared().orientation = .portrait

Apple 希望尽快解决这个问题。你也可以 report对 Apple 来说也是一个错误。

关于ios - 界面测试失败 : Failed to update to requested orientation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39917066/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com