ZeroConf from Delphi win32 server to a Mac OSX or iPhone objective-C client

I’m trying to make ZeroConf work between a Delphi Win32 server and a library that will become part of a Mac OS X app, and an iphone/iOS app. Thus client-side discovery on apple platforms is probably going to be using “bonjour”.

I have put TRoZeroConfRegistration component onto my server’s data module, and added (rather uncommented)
the function call that the docs say I should add:

initialization
fClassFactory := TROClassFactory.Create(‘RentalPointService’, {$IFDEF FPC}@{$ENDIF}Create_RentalPointService, TRentalPointService_Invoker);

RegisterForZeroConf(fClassFactory,‘RentalPointService’);

I set the Engine type to zceAuto and that didn’t work so I tried zceBonjour, and now I get an exception at startup,
saying it can’t find what I assume must be a Bonjour runtime DLL. This computer and most client computers that get this Windows server service app are not running iTunes, and installing iTunes would not be the most fun way to go for most corporate systems. I’m bessing that the DLL it can’t load is a Bonjour one:

EDllNotFoundException : Cannot load dnssd.dll library.

What’s the recommended way to get this working? Is dnssd.dll a Bonjour runtime file?

I found this smaller simpler redistributable way to get Bonjour going on a PC:

http://support.apple.com/kb/DL999

Also you can use ROZeroConfHub application.

ROZeroConfHub does not work between my iPhone and my Windows PC, nor does it work between my Windows PC and my Mac. (I tested with iPhone PCTrade sample, and with the OS X PCTrade DASimpleClient demos)

More fun: When I run in the iPhone simulator, sometimes the whole PCTrade for iPhone app crashes:

2013-02-04 11:23:18.973 PCTrade[42363:11303] RO: not resolved
2013-02-04 11:23:18.974 PCTrade[42363:11303] RO: NSNetServicesErrorDomain = 10
2013-02-04 11:23:18.975 PCTrade[42363:11303] RO: NSNetServicesErrorCode = -72007
2013-02-04 11:23:26.973 PCTrade[42363:11303] *** Terminating app due to uncaught exception ‘RO Exception’, reason: ‘Could not resolve ZeroConf Service <NSNetService 0x7663e10> local. _DASampleService_rosdk._tcp. DASampleService.’
*** First throw call stack:
(0x14cc012 0x1294e7e 0x2cb74 0x2ce73 0x2364 0x22ce9c 0x93bf 0x2eb22b 0x2eaaeb 0x1e94b05 0x1804cd2 0x1802d87 0x1e942a4 0x148caa8 0x144ff3f 0x144fa39 0x1472734 0x1471f44 0x1471e1b 0x217a7e3 0x217a668 0x5b7ffc 0x1d2d 0x1c65)
libc++abi.dylib: terminate called throwing an exception
(lldb)

I’m posting the above crash as a new question. I believe it’s an unhandled exception inside the libDataAbstract.a

Did you run ROZeroConfHub with running Bonjour? If so can you uninstall/stop Bonjour and retest, please? What version of windows you are using?

Windows 8 Pro 64 bit, and only using Apple Bonjour Service. Not using ROZeroConfHub because when I tried to use it, discovery features did not work on iPhone and Mac OS X objective-C client demo apps.

Are you satisfied with Apple Bonjour Service ?

Not really, but I suspect there’s zero that you can do about it. If you could fix the ROZeroConfHub app so it works with iPhone SDK clients, that would be great. (Maybe it already works for you?)

if there are any issues with ROZeroConfHub, we definitely need to fix them, yes. it should be a full drop-in replacement for a Bonjour

I tested with “Phone Pairing” sample from our latest release and ROZeroConfHub works fine (without Apple Bonjour Service) for iOS client.

Okay. I’ll keep trying to see if there’s something I can do to make it work here, or if not I’ll report back with information on how to reproduce issues.