I have a warnings ‘Capture of ‘self’ with non-sendable type ‘Type?’ in a @Sendable
closure‘ for this code
func launchPairingAtCorrectStepAfter(timeout: TimeInterval) {
Timer.scheduledTimer(withTimeInterval: connexionTimeout, repeats: false, block: { [weak self] _ in
self?.launchPairingAtCorrectStep()
})
}
I have been trying to resolve it with Task{ @MainActor }