Search results for

[tags:wwdc20-10188]

2 results found

Post

Replies

Boosts

Views

Activity

Lowering Memory Footprint as SwiftUI App Moves to Background
I'm hoping that someone could point me towards some concrete steps for reducing the memory footprint of a SwiftUI app as it moves to the background. I've read Preparing Your UI to Run in the Background - https://developer.apple.com/documentation/uikit/app_and_environment/scenes/preparing_your_ui_to_run_in_the_background; however, this is applicable to UIKit, and I'm not sure how to translate it into SwiftUI. I'm working on an app that generates audio, and would like it to continue doing so if the user locks their phone or opens another app. My app usually works in the background, but seems to stop when I open a more demanding app in the foreground. In simulator and device testing, I notice that my application memory remains constant as the app moves to and from the foreground (I also note that my app memory is above the 50 MB threshold recommended in WWDC20 Session 10078)
0
0
865
Nov ’20
Metric Kit: applicationExitMetrics / cumulative properties (app lifetime or time interval)
func didReceive(_ payloads: [MXMetricPayload]) { for metricPayload in payloads { if let backgroundExitReason =tttt metricPayload.applicationExitMetrics?.backgroundExitData { let value = backgroundExitReason.cumulativeAppWatchdogExitCount Is the cumulativeAppWatchdogExitCount cumulated over the whole App lifetime or is this value only cumulated for the time period defined by the MXMetricPayload timestamps timeStampBegin & timeStampEnd?
0
0
1.3k
Jun ’20