Thank you @Rick Clephas. I knew how to fix it but still I didn't understand what's wrong. Which init is mutating?
r
Rick Clephas
12/04/2023, 7:00 PM
The
init
of the
MyApp
struct. Inside the init
self
is mutating which is captured by the Tasks escaping closure.
Per the comment: that is and error by default, unless explicitly specifying the captured self (which makes self immutable).