So I will post an answer to this issue, as it may help someone in the future who has a similar issue.
As it turns out, the problem was indeed with the animations.
In most parts of my code I used the following instance method:
func animation(_ animation: Animation?) -> some View
Which btw. apparently will be deprecated in iOS 15. Source: Apple documentation
The problem was that every time the view was reloaded all the views got animated regardless if they should or not. My personal guess is that this was causing some concurrency issues in the background.
Anyways, the solution seams to be this
func animation<V>(_ animation: Animation?, value: V) -> some View where V : Equatable
Where value is:
A value to monitor for changes.
Using this, if you configure the view properly, even when running in the background, views will get animated when the monitored value has changed.
I hope this will help someone. This definitely solved my problem!
Topic:
Media Technologies
SubTopic:
Audio
Tags: