In my objective C project i am using
[(NSInputStream *)CFReadStreamCreateForStreamedHTTPRequest(kCFAllocatorDefault, request,(C
To use dataTaskWithRequest:, you need to create an NSURLRequest, not a CFHTTPMessageRef.
CFHTTPMessageRef
As for kCFStreamPropertyHTTPProxyHost, this question asks “How to programmatically add a proxy to an NSURLSession” and has an answer that looks good to me.
kCFStreamPropertyHTTPProxyHost