objcio / tiny-networking

Tiny Networking Library

Home Page:http://talk.objc.io/collections/networking

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot compile with Xcode 13

davidjrogers opened this issue · comments

Line 292 of Endpoint.swift.

Use of local variable 'data' before its declaration

Hey @davidjrogers, sorry about that, I'm not sure why Xcode doesn't like that. It's the async/await stuff, but I thought it was properly behind conditional compilation.

In any case, you should be able to work around this by depending on a specific tag instead of master. Please reopen if that doesn't fix this issue.

Shouldn't it get fixed in master too? The fact that it doesn't compile where it should be supported doesn't sound like the issue is resolved.

Yes, you're right. I think I'll just reopen it and hope that this'll get fix in the next version of Xcode. I don't have the time to dig into the underlying cause right now, but am very happy to take a PR.

Might be related... Xcode 13 broke archiving (and building with Any iOS Device build target) for me with the error Cannot find 'dataTaskPublisher' in scope.

I added the following to my package and it works again:

platforms: [
    .iOS(.v13),
    .macOS(.v10_15)
],

So it kind of seems like @available is not working correctly in packages.

@davidjrogers you might try forking and setting the platform to v15 and see if that helps.

I think this should be fixed in the latest commit... let me know if this is still an issue and I'll reopen it =)