Post

Replies

Boosts

Views

Activity

Supported way for a watchOS clock app to stay frontmost after the screen dims?
I'm building a standalone watchOS app (SwiftUI, watch-only) whose main screen is its own full-screen clock. Users who choose this clock want it to remain the screen they see on wrist raise, instead of returning to the system watch face after the inactivity timeout. I'd like to know whether watchOS supports this for an App Store app, and which API to use. What I've looked at (watchOS 27.2 SDK, Xcode 27.2): Always On + Return to Clock. The app supports the Always On state. This works up to the Return to Clock interval the user chooses (at most one hour, per "Taking advantage of frontmost app state"). After that, the system face returns. WKApplication.isFrontmostTimeoutExtended. The documentation says it has had no effect since watchOS 7. In a test, reading it back gave false, and the app went to the background after about 2 minutes. WKExtendedRuntimeSession. The documentation asks developers to pick a session type based on the app's actual purpose (self care, mindfulness, physical therapy, smart alarm). None of these fits a clock, so I'm not using one to gain runtime. App Intents supportedModes / LongRunningIntent. These bring the app to the foreground when an intent runs, or run long background work. I couldn't find a way to use them to return automatically after the timeout. openSystemURL with the app's own URL scheme from a background callback. This didn't reopen the app. Other clock apps on the App Store offer a "keep active" style option, so I'm wondering whether a supported mechanism exists that I've missed. Questions: Is there a supported API or capability that lets a user-selected clock app stay frontmost, or come back automatically, after the inactivity timeout? Normal exits must still work: the Digital Crown, other apps, notifications, locking and Sleep Focus. If this isn't supported, is the limit intentional? Is per-app Return to Clock plus Always On the intended maximum? I can share a minimal sample (FrontmostClockProbe) that uses only public APIs and logs scene phase and luminance state. Thanks!
1
0
45
2h
Supported way to hide the system time in a full-screen watchOS clock app?
I'm building a standalone watchOS app (SwiftUI, watch-only) whose main screen is its own full-screen clock. The system time in the top-right corner duplicates our clock, so we'd like to hide it while this view is visible. I'd like to know which API is supported for this in an App Store app. What I tried (watchOS 27.2 SDK, Xcode 27.2): .persistentSystemOverlays(.hidden) on the root view and on the scene. The system time stays visible. In a variant with a NavigationStack and a hidden navigation bar, the time was briefly absent after launch, but it came back within about 20 seconds. .statusBarHidden(_:) and .toolbarVisibility(.hidden, for: .statusBar) are marked unavailable on watchOS in the SDK. View._statusBarHidden(_:) hides the system time reliably. In the watchOS SwiftUI interface it is public, available on watchOS since 6.0, and has no @_spi. It inlines to _statusBar(hidden:). However, it's underscored and I can't find documentation for it. Minimal example: struct ClockView: View { var body: some View { MyFullScreenClock() .persistentSystemOverlays(.hidden) // documented, but time remains visible ._statusBarHidden(true) // hides the time, but undocumented } }I've noticed this modifier in shipping open-source watchOS code, for example Home Assistant's watch app (Sources/WatchApp/Home/WatchHomeView.swift). That doesn't tell me whether Apple supports it, though. Questions: Is _statusBarHidden(_:) / _statusBar(hidden:) a supported API for a distributed watchOS app? If not, is there a documented way for a full-screen clock app to hide the system time, or is the system time intentionally always shown in third-party apps? I can share a small sample project that toggles between the documented overlay preference and the underscored modifier. Thanks!
1
0
49
3h
Supported way for a watchOS clock app to stay frontmost after the screen dims?
I'm building a standalone watchOS app (SwiftUI, watch-only) whose main screen is its own full-screen clock. Users who choose this clock want it to remain the screen they see on wrist raise, instead of returning to the system watch face after the inactivity timeout. I'd like to know whether watchOS supports this for an App Store app, and which API to use. What I've looked at (watchOS 27.2 SDK, Xcode 27.2): Always On + Return to Clock. The app supports the Always On state. This works up to the Return to Clock interval the user chooses (at most one hour, per "Taking advantage of frontmost app state"). After that, the system face returns. WKApplication.isFrontmostTimeoutExtended. The documentation says it has had no effect since watchOS 7. In a test, reading it back gave false, and the app went to the background after about 2 minutes. WKExtendedRuntimeSession. The documentation asks developers to pick a session type based on the app's actual purpose (self care, mindfulness, physical therapy, smart alarm). None of these fits a clock, so I'm not using one to gain runtime. App Intents supportedModes / LongRunningIntent. These bring the app to the foreground when an intent runs, or run long background work. I couldn't find a way to use them to return automatically after the timeout. openSystemURL with the app's own URL scheme from a background callback. This didn't reopen the app. Other clock apps on the App Store offer a "keep active" style option, so I'm wondering whether a supported mechanism exists that I've missed. Questions: Is there a supported API or capability that lets a user-selected clock app stay frontmost, or come back automatically, after the inactivity timeout? Normal exits must still work: the Digital Crown, other apps, notifications, locking and Sleep Focus. If this isn't supported, is the limit intentional? Is per-app Return to Clock plus Always On the intended maximum? I can share a minimal sample (FrontmostClockProbe) that uses only public APIs and logs scene phase and luminance state. Thanks!
Replies
1
Boosts
0
Views
45
Activity
2h
Supported way to hide the system time in a full-screen watchOS clock app?
I'm building a standalone watchOS app (SwiftUI, watch-only) whose main screen is its own full-screen clock. The system time in the top-right corner duplicates our clock, so we'd like to hide it while this view is visible. I'd like to know which API is supported for this in an App Store app. What I tried (watchOS 27.2 SDK, Xcode 27.2): .persistentSystemOverlays(.hidden) on the root view and on the scene. The system time stays visible. In a variant with a NavigationStack and a hidden navigation bar, the time was briefly absent after launch, but it came back within about 20 seconds. .statusBarHidden(_:) and .toolbarVisibility(.hidden, for: .statusBar) are marked unavailable on watchOS in the SDK. View._statusBarHidden(_:) hides the system time reliably. In the watchOS SwiftUI interface it is public, available on watchOS since 6.0, and has no @_spi. It inlines to _statusBar(hidden:). However, it's underscored and I can't find documentation for it. Minimal example: struct ClockView: View { var body: some View { MyFullScreenClock() .persistentSystemOverlays(.hidden) // documented, but time remains visible ._statusBarHidden(true) // hides the time, but undocumented } }I've noticed this modifier in shipping open-source watchOS code, for example Home Assistant's watch app (Sources/WatchApp/Home/WatchHomeView.swift). That doesn't tell me whether Apple supports it, though. Questions: Is _statusBarHidden(_:) / _statusBar(hidden:) a supported API for a distributed watchOS app? If not, is there a documented way for a full-screen clock app to hide the system time, or is the system time intentionally always shown in third-party apps? I can share a small sample project that toggles between the documented overlay preference and the underscored modifier. Thanks!
Replies
1
Boosts
0
Views
49
Activity
3h