Having major issues getting any networking working on WatchOS 2. See this thread and the sub-threads for more related from others as well:
https://forums.developer.apple.com/message/30666
Anyway, at this point will try anything. Thinking maybe Apple only intended NSURLSession to work on WatchOS and everything else is broken by design even though everything except some NSStream oddities works great on the WatchOS 2 Simulator.
Thus, converting everything to NSURLSessionStreamTask. I'm not sure this class is ready for prime time, or maybe I'm not clear on how it's used as there's no sample code. The basic sequence of streamTaskWithHostName then resume opens and then immediately closes a connection which I've verified by sniffing packets. The connection is closed well before I can read or write it. This has been the case for many betas and continues in b5.
So the questions are:
1. Is NSURLSession the only way to perform networking on WatchOS 2 as it seems? Or are these issues in betas 1 through 5 just bugs and I should go on using the Simulator happily, knowing sockets will work.
2. If it is not, what are the networking APIs we can rely upon going forward in WatchOS 2? We are heavily based on UDP under normal circumstances, but we can live with TCP if there's no other choice. Since all of them seem non-functional right now, I'd at least like to get a correct answer of what is expected to work so we stop going down these dead ends.