I am getting an error when I try to update the Swift version of my project to 6.0.
I am not sure if it is the problem of the SDK or if I should use a different way to use it.
Sending main actor-isolated value of type 'WebAuthenticationSession' with later accesses to nonisolated context risks causing data races
Sending 'decoder'-isolated value of type 'AVAudioTime' with later accesses to actor-isolated context risks causing data races; this is an error in the Swift 6 language mode.
The relevant code is here
for await _ in AsyncTimerSequence.repeating(every: .milliseconds(10), tolerance: .microseconds(10)) {
Task {
if let lrt = await rtpAudioPlayer.lastRender() {
if let (pcmBuffer, audioTime) = await decoder.nextPacket(atTime: consume lrt) {
// Seeing error here
await rtpAudioPlayer.scheduleAudioBytes(buffer: pcmBuffer, atTime: consume audioTime)
}
}
}
}
And also it is obviously true that there are no later accesses to my audioTime in either the caller or the returner.
The full project is available here (latest pushes coming soon): roam