NSNetServiceBrowser unable to discover services while connected to paired iPhone

Originator:liam.nichols.LN
Number:rdar://22211240 Date Originated:10.08.2015
Status:Open Resolved:
Product:watchOS Product Version:2.0 (13S5325c)
Classification:Serious Bug Reproducible:Always
 
Liam Nichols10-Aug-2015 03:40 PM

Summary:
The NSNetServiceBrowser class is unable to discover services when the Watch is connected to its paired iPhone and returns no suitable error messages via the delegate callback.

I asked on the new developer forums (https://forums.developer.apple.com/thread/13988) however have not had a response so will raise as a bug for now although it might need reclassifying.

I understand that there might be other factors causing this (like power saving etc) however I would expect that NSNetServiceBrowser would work like NSURLSession when connected with a paired iPhone and utilise the iPhone's WiFi to scan for services instead.

Steps to Reproduce:
1. Create a watchOS 2 Application/Extension using Xcode7 Beta5
2. Initialise an instance of NSNetServiceBrowser within the template WKInterfaceController implementation and conform to the NSNetServiceBrowserDelegate
3. Call searchForServicesOfType:inDomain on the browser passing an empty string for the domain and a service type that you know exists on your network

Expected Results:
Either an error should be returned via the NSNetServiceBrowserDelegate callback or services should be discovered

Actual Results:
Neither an error is returned or services (that are present on the WiFi network) are discovered

Version:
watchOS 2.0 (13S5325c)

Notes:


Configuration:


Attachments:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!