We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb4ab76 commit 31495abCopy full SHA for 31495ab
Sushitrain/ContentView.swift
@@ -281,14 +281,16 @@ private struct LoadingView: View {
281
.frame(maxWidth: 320)
282
}
283
284
- .onAppear {
285
- Log.info("Asserting idle timer disable")
286
- UIApplication.shared.isIdleTimerDisabled = true
287
- }
288
- .onDisappear {
289
- Log.info("Deasserting idle timer disable")
290
- UIApplication.shared.isIdleTimerDisabled = false
291
+ #if os(iOS)
+ .onAppear {
+ Log.info("Asserting idle timer disable")
+ UIApplication.shared.isIdleTimerDisabled = true
+ }
+ .onDisappear {
+ Log.info("Deasserting idle timer disable")
+ UIApplication.shared.isIdleTimerDisabled = false
292
293
+ #endif
294
295
296
0 commit comments