5

我需要覆盖 Apple Watch 模拟器的状态栏显示时间,所以我可以截取时间 - 10:09。我在终端中使用此命令来执行此操作,但它没有按预期工作。该命令虽然适用于 iOS 模拟器。

xcrun simctl status_bar "Apple Watch Series 5 - 44mm" override --time "10:09"

我确实有一个同名的模拟器(Apple Watch Series 5 - 44mm)正在运行。

如何覆盖 Apple Watch 模拟器的时间?

模拟器版本:11.3.1版(SimulatorApp-912.5.1 SimulatorKit-570.3 CoreSimulator-681.17.2)

4

1 回答 1

0

我对 Xcode 13.2 有同样的问题。当我运行命令时,我收到以下错误消息:

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=1):
Status bar overrides not supported on this platform.
Operation not permitted

例如,我发现的唯一解决方法是将我的 macOS 时间手动设置为 9:40。然后,我关闭模拟器并再次启动它,以便更新新时间。在您的 watchOS 应用程序完成加载后,您有大约一分钟的时间来拍摄必要的屏幕截图。

于 2021-12-15T14:46:58.933 回答