Error in try await URLSession.shared.data

I tried to compile the async/await on swift-5.5-DEVELOPMENT-SNAPSHOT-2021-05-30-a-ubuntu20.04 but get this error. Is async/await available on Linux?

url.swift: error: type of expression is ambiguous without more context let (data, response) = try await URLSession.shared.data(from: url) ~~~~^~~~~~~~~~~~~~~~~~~~~

The new Foundation APIs don't exist on Linux yet.

1 Like

Is this still the case? When will that change?

1 Like
Terms of Service

Privacy Policy

Cookie Policy