Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement URLResponse.init() #4778

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

woxtu
Copy link
Contributor

@woxtu woxtu commented Jun 22, 2023

This PR implements URLResponse.init(). Resolves #4388.

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this is correct. The definition of NSURLResponse does not indicate that -[NSURLResponse init]; is a designated nor convenience initialiser. This happens to work on macOS due to the ObjC underpinnings.

@parkera - am I way off base here and this should be an available API or should this not be available?

@brianmichel
Copy link

Just wanted to chime in that I ran into this issue as well recently when trying to bring a library cross platform. While I can understand the desire for correctness, I'd argue that any construction of Swift code that isn't relying on something OS specific feels like fair game for reimplementation on SCF (or the eventual Swift Foundation) since it should be as much of a drop in replacement IMO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SR-12671] URLResponse.init is not accessible in FoundationNetworking
3 participants