The Problem was a Timer in which some Actions with an Animation were executed.
I solved the Problem by checking at the beginning of the timer, if the app is Active:
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in
data.isAppActive = false
}
.onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in
data.isAppActive = true
}
Timer.scheduledTimer(withTimeInterval: 0.2, repeats: true) { (_) in
guard data.isAppActive else { return }
...
}
Topic:
Media Technologies
SubTopic:
Audio
Tags: