In watchOS 2 your watch extension is running on the watch itself. It’s typical for the watch not to have any active network interfaces, and thus BSD Sockets communication won’t work. [The watch has a Wi-Fi interface and can activate that interface, but that’s not something that’s under your control.]
Watch extensions are expected to access the network using NSURLSession. This will typically pass the request to the iPhone, allowing the watch to save power by not running the request locally. [Under some circumstances the watch will run the request itself but, again, this isn’t under your control.]
You have a couple of options here:
reformulate your networking in terms of NSURLSession
if that’s not possible (say, you’re talking to a server that requires a custom TCP-based protocol), do that work on the iPhone
With regards the last point, the Watch Connectivity framework makes it easy to pass work back and forth between your watch extension and your iPhone app.
Share and Enjoy
—
Quinn "The Eskimo!"
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
let myEmail = "eskimo" + "1" + "@apple.com"