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

Add watchOS 3.0 availability for urlSession(:task:didFinishCollecting:) #1175

Merged
merged 1 commit into from
Apr 28, 2020
Merged

Conversation

SimonRice
Copy link
Contributor

@SimonRice SimonRice commented Apr 28, 2020

I've updated to the latest version of Apollo iOS today on a project I have in the works 🎉.

However, when set up via SPM on a watchOS-only project, the main Apollo library wouldn't build because of this error:

/path/to/apollo-ios/Sources/Apollo/URLSessionClient.swift:115:53: error: 'URLSessionTaskMetrics' is only available in watchOS 3.0 or newer
                       didFinishCollecting metrics: URLSessionTaskMetrics) {
                                                    ^
/path/to/apollo-ios/Sources/Apollo/URLSessionClient.swift:113:13: note: add @available attribute to enclosing instance method
  open func urlSession(_ session: URLSession,
            ^
/path/to/apollo-ios/Sources/Apollo/URLSessionClient.swift:11:12: note: add @available attribute to enclosing class
open class URLSessionClient: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDataDelegate {

In this PR, I've opted for adding watchOS 3.0 to the existing @available attribute on the instance method.

@SimonRice SimonRice changed the title Add watchOS 3.0 availability for urlSession(:task:didFinishCollecting) Add watchOS 3.0 availability for urlSession(:task:didFinishCollecting:) Apr 28, 2020
Copy link
Contributor

@designatednerd designatednerd left a comment

Choose a reason for hiding this comment

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

Gah, I thought I got all these but apparently not. Good catch!

@designatednerd designatednerd merged commit 0200b59 into apollographql:master Apr 28, 2020
@SimonRice SimonRice deleted the watch-out branch April 28, 2020 18:26
@designatednerd designatednerd added this to the Next Release milestone Apr 28, 2020
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.

2 participants