CocoaMultipeer icon indicating copy to clipboard operation
CocoaMultipeer copied to clipboard

Won't build.

Open pkclsoft opened this issue 9 years ago • 5 comments

I've opened the project in Xcode 7 or 7.1, and attempted to build the iOS app (I'd like to see the framework functioning before I try integrating it).

I am unable to build because when Xcode tries to build the MultipeerCocoaWatchOS framework (presumably for the Watch app), it fails with errors on every reference to NSNetService, as if Foundation isn't available.

screen shot 2015-09-20 at 3 48 02 pm

pkclsoft avatar Sep 20 '15 05:09 pkclsoft

You're right the NSNetService class has been marked __WATCHOS_PROHIBITED in the Foundation reference. That is really strange since in Apple's watchOS documentation there is a reference to the NSNetService class: https://developer.apple.com/library/watchos/documentation/Cocoa/Reference/Foundation/Classes/NSNetService_Class/index.html#//apple_ref/c/tdef/NSNetServiceOptions This is probably a bug on Apple's part and you should probably file a radar with them. In the mean time I will try to look for a workaround in case Apple has decided to drop support for NSNetService in watchOS

manavgabhawala avatar Sep 20 '15 05:09 manavgabhawala

I found this. It looks like it might be deliberate.

https://developer.apple.com/library/prerelease/watchos/releasenotes/General/watchOS2SeedAPIDiffs/Swift/Foundation.html

pkclsoft avatar Sep 20 '15 06:09 pkclsoft

I'm looking at using this for tvOS because Apple have not included MultipeerConnectivity and I really need to be able to set up adhoc networks. I'm hoping your framework will work on tvOS.

pkclsoft avatar Sep 20 '15 06:09 pkclsoft

It looks like Apple removed NSNetServices and its friends on watchOS which is really disappointing (maybe I can try to build around that by using some CoreFoundation classes or even some POSIX classes like CFSocket if those are even available on watchOS. However, on the upside, a tvOS framework looks promising because NSNetService is available on it. Hopefully, I can look at the programming reference soon and get a browser and advertiser UI going and fully support it, along with the launch of the framework

manavgabhawala avatar Sep 20 '15 07:09 manavgabhawala

I'll fork and remove the WatchOS stuff there. I'll also see if I can get tvOS going.

pkclsoft avatar Sep 20 '15 07:09 pkclsoft