title: conforming to a protocol require delegate variable be available in ios13
body: <p>having this protocol</p>
  <pre><code> public protocol URLSessionWebSocketTaskProtocol {
  
      func send(_ message: URLSessionWebSocketTask.Message, completionHandler: @escaping (Error?) -&gt; Void)
      func receive(completionHandler: @escaping (Result&lt;URLSessionWebSocketTask.Message, Error&gt;) -&gt; Void)
      func sendPing(pongReceiveHandler: @escaping (Error?) -&gt; Void)
      func cancel(with closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?)
      func resume()
  }
  </code></pre>
  <p>and conforming to it in this part</p>
  <pre><code>extension URLSessionWebSocketTask: URLSessionWebSocketTaskProtocol {}
  </code></pre>
  <p>works fine, but I need to have delegate property in the protocol so modified the protocol to this</p>
  <pre><code>public protocol URLSessionWebSocketTaskProtocol {
  
  func send(_ message: URLSessionWebSocketTask.Message, completionHandler: @escaping (Error?) -&gt; Void)
  func receive(completionHandler: @escaping (Result&lt;URLSessionWebSocketTask.Message, Error&gt;) -&gt; Void)
  func sendPing(pongReceiveHandler: @escaping (Error?) -&gt; Void)
  func cancel(with closeCode: URLSessionWebSocketTask.CloseCode, reason: Data?)
  func resume()
  var delegate: URLSessionTaskDelegate? { get set}
  </code></pre>
  <p>}</p>
  <p>now the compiler tells that</p>
  <blockquote>
  <p>Protocol 'URLSessionWebSocketTaskProtocol' requires 'delegate' to be available in iOS 13.0.0 and newer</p>
  </blockquote>
  <p>the target minimun version is set to iOS 13, so it should be necessary to add the @available(iOS 13.0, *), but added any way and there is not change the compilers keeps telling that protocol requires delegate to be available in iOS 13.
  <strong>URLWebSocketTask</strong> does not have a delegate property per se it inherits from <strong>URLSessionTask</strong> that have a delegate Property of type <strong>URLSessionTaskDelegate</strong> and URLWebSocketTaskDelegate comforms to URlSessionTaskDelegate.</p>
  <p>so how I could add a delegate to the protocol and the conformance does not show that error.</p>