Overriding status bar display time for Apple Watch simulator (using xcrun simctl status_bar)
Asked Answered
M

1

6

I need to override the status bar display time for Apple Watch simulator, so I can take screenshots with the time - 10:09. I am using this command in the terminal to do this but it is not working as expected. The command works fine for iOS simulator though.

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

I do have a simulator with that name (Apple Watch Series 5 - 44mm) running.

How can I override the time for Apple Watch simulator?

Simulator version: Version 11.3.1 (SimulatorApp-912.5.1 SimulatorKit-570.3 CoreSimulator-681.17.2)

Marroquin answered 26/2, 2020 at 7:8 Comment(3)
Seems this cmd doesn't support Apple Watch at the moment.Yehudit
@Yehudit is there any official reference mentioning that?Marroquin
It just doesn't mention, I remember this's a new cmd introduced months ago. u can try xcrun simctl status_bar "Apple Watch Series 5 - 44mm" list to take a look at the current settings, as a result, u'll see that, even the time set by xcrun simctl status_bar "Apple Watch Series 5 - 44mm" override --time "10:09" succeeded, the simulator doesn't update the time label. Anyway, hope it supports in the future.Yehudit
L
0

I'm having the same issue with Xcode 13.2. When I run the command I get the following error message:

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

The only workaround I found was to set my macOS time manually to 9:40, for example. Then, I close the simulator and launch it again so the new time is updated. After your watchOS app finishes loading you have about a minute to take the necessary screenshots.

Lothaire answered 15/12, 2021 at 14:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.