URL.AsyncBytes back deployment

We can back deploy async/wait code back to iOS 13 / iOS 14. Are there any plans to make things like these available as well?

@available(macOS 12.0, iOS 15.0, tvOS 15.0, watchOS 8.0, *)
public var resourceBytes: URL.AsyncBytes { get }

John did something along these lines with GitHub - JohnSundell/AsyncCompatibilityKit: iOS 13-compatible backports of commonly used async/await-based system APIs that are only available from iOS 15 by default., although URL is not yet in there.

At least as of the last time I discussed this with the Concurrency team, the back deployment infrastructure doesn't have everything we would need to back deploy the AsyncBytes API family.

2 Likes

I back ported URLSession's AsyncBytes to the older releases, so you could take a look at that to implement the rest of URL/FileHandle's implementations: GitHub - mochidev/URLSessionBackport: Backward compatible async/await for URLSession!

1 Like
Terms of Service

Privacy Policy

Cookie Policy