Is it possible to do so ?
It is not possible to do this with our high-level APIs. Why do you need this? I presume you have a good reason, in which case I recommend that you put that reason into a bug report requesting that NSURLSession support this.
With low-level APIs you can force a particular TCP connection to run over a particular interface, which allows this sort of thing. It's kinda ugly those, not least because you have to build your own HTTP implementation on top of the TCP connection you're using.
I posted about this extensively on the old DevForums:
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"