From e3f69ceeab7981f4a5eb5a5f51881f3543938805 Mon Sep 17 00:00:00 2001 From: Gui Rambo Date: Thu, 1 Jul 2021 15:21:31 -0300 Subject: [PATCH] Fixed deprecations --- WWDC/SharePlayManager.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WWDC/SharePlayManager.swift b/WWDC/SharePlayManager.swift index 1a422bcc..139a55a5 100644 --- a/WWDC/SharePlayManager.swift +++ b/WWDC/SharePlayManager.swift @@ -50,7 +50,7 @@ final class SharePlayManager: ObservableObject { self.canStartSharePlay = newValue }.store(in: &cancellables) - let task = detach { + let task = Task.detached { for await session in WatchWWDCActivity.sessions() { self.cancellables.removeAll() @@ -85,7 +85,7 @@ final class SharePlayManager: ObservableObject { let activity = WatchWWDCActivity(with: session) - async { + Task { let result = await activity.prepareForActivation() switch result {