swisspol/GCDWebServer

GCDWebServerOption_TXTRecordDictionary?

Closed this issue · 8 comments

I'm replacing an older version of GCDWebServer where I use the TXTRecordDictionary for Bonjour broadcast. Why was this removed and how can I get it back in? Seems like something so simple that was removed?

I don't recall exactly as it's very old but it was most likely due to this setting being unreliable. Or maybe it was deprecated or not fully supported or something. There had to be a good reason at the time.

I don't recall exactly as it's very old but it was most likely due to this setting being unreliable. Or maybe it was deprecated or not fully supported or something. There had to be a good reason at the time.

This isn't a very good answer since I need this to continue to use your product as a Cocoapod. We need to broadcast information via Bonjour. I found the patch request from 2015 and implemented and it's not deprecated or fully supported or something... it seems pretty straightforward and reliably used by hundreds of thousands of our users. It does not effect any users unless it's used so I'm not sure why it would have been removed. When can we expect this to be restored? 3b75314

I took the liberty of checking. The following calls that are made for this feature are alive and well and working in macOS Catalyst. They are not deprecated so I see no reason to not implement this.

https://developer.apple.com/documentation/cfnetwork/1426572-cfnetservicecreatetxtdatawithdic?language=objc

https://developer.apple.com/documentation/cfnetwork/1426670-cfnetservicesettxtdata?language=objc

So I don't know how you found this commit 3b75314 but it's not on master. This feature never shipped as part of GCDWebServer. You must have been on a branch or fork, I have no clue.

There's also no trace in the history of the codebase of a GCDWebServerOption_TXTRecordDictionary option.

I'm not sure. I had downloaded GCDWebServer from GitHub before CocoaPods. I can try to figure out where it was downloaded from, but it wasn't a branch that I was aware of. All I know is that we have this installed as source code since January 2014 is it was likely downloaded in late 2013. At this point however, I need to use the CocoaPods moving forward and it's now missing in the build.

GCDWebServer was added to our project on December 5, 2013. Being that CocoaPods didn't launch its first version until December 30, 2015, I had downloaded it from your site at some point and had not updated it significantly since then. So as far as I can tell, this Bonjour capability has been in the framework since we started using it in 2013. ¯_(ツ)_/¯

It looks like I had downloaded a version of the GCDWebServer code again in 2017 that reorganized the framework into folders such as "Core" and that was updated on our end in August 2017, but appears to have copyright marker of 2012-2015. If I dig back further it looks like the method that included TXT data was in place December 13, 2013. The branch that I mentioned wasn't until 2015 so I'm a bit confused.