Chapter 4 Warning: Reference to captured var 'countdown' in concurrently-executing code; this is an error in Swift 6

Swift 6 will not allow referencing or mutating the ‘countdown’ variable inside the scheduleTimer block.
What would be a Swift 6-compatible solution?

1 Like

Swift 6 isn’t released yet, I can’t speculate how the code would look like when released.


As Swift 6 is released, could you please advise a solution

It is still not released

1 Like

I was hoping to find answers here but not very helpful.