Multipeer iOS 14 Error -72008

We have used MPC to advertise and browse for a config service for our app. All was working fine but now when we try and use this building our app with Xcode 12 and installing on iOS 14 on an iPhone we no longer can advertise or browse for our service. We have added the local network privacy string to our info.plist and also added Bonjour Services to our info.plist as well. We have a service named "zconfig-cfg" and we have tried many different variations of listing it in the Bonjour Services ... we have followed other examples and tried "zonfig-cfg.tcp" and "zconfig-cfg.upd" and variations without the leading underscore as well. Whenever we try and advertise or call browse we are getting this error code "missingRequiredConfigurationError".

What are we possibly missing? This was working fine when we ran it on iOS 13. It also worked on iOS 14 when we installed our app that was built with Xcode 11. Now when we build with Xcode 12 and install it direct to an iOS 14 device we cannot figure out what we are missing.

Replies

I'm encountering a similar issue. The didNotStartBrowsingForPeers method gets called.

Did you find a resolution?
Hi!

You're on the right track. I think you didn't have the right combo of underscores, maybe? The error is NSNetServicesMissingRequiredConfigurationError, and it has to do with the two keys you specified.

Things are working on my end after adding these to my Info.plist:
  • "Privacy - Local Network Usage Description" - Description of what your service is up to (this should show up in an alert)

  • "Bonjour services" - An array of two items, with this formula "yourservice.tcp" and "yourservice.udp". My "ar-collab" service is "ar-collab.tcp" and "ar-collab.udp".

That did it for me!
  • This worked perfectly for me. Thank you.

Add a Comment
Hi, I encountered the same issue and resolved using solution proposed by DJHarter in this Thread: https://developer.apple.com/forums/thread/651842
As robotconscience has written, the additions to the Info.plist are apparently necessary as stated in the documentation.
However, the documentation also states the format of the Bonjour service array entries and they need to be including the underscores, for example "_zonfig-cfg._tcp" and "_zconfig-cfg._upd" as they are used with bonjour. It only works for me in this format. I also had to delete and reinstall the app on device before it would ask me for the new local networking permission.
Post not yet marked as solved Up vote reply of kjyv Down vote reply of kjyv
My error was NSetServicesErrorCode -72008 NSNetServicesErrorDomain = 10 ("Failed to Publish Service..." and the solution was as "robotconscience" and "kjyv" have said here.