I figured it out(at least partially). The service type you declare when creating an MCNearbyServiceAdvertiser is used by MultiPeerConnectivity to generate the actualy Bonjour service so if you have the service type my-service declaring _my-service_.tcp in Info.plist as a Bonjour Service solves the issue.
With this change at least it works as expected, i.e. the prompt shows up and the device can discover other devices, however it's not clear if _{service}_.tcp is enough? Given that MultiPeerConnectivity is a high level framework do I also need to declare _{service}_.udp and others in Info.plist?
Post
Replies
Boosts
Views
Activity
I've also been trying to make this work but I have been unable to figure it out. When importing the binary framework I simply get a module not found error. I've reduced it down to a small case https://github.com/k0nserv/rust-swift-test.
EDIT: For completness sake I tried removing Rust from the equation by writing the library directly in C and building it with clang but it still doesn't work.
I'm also interested in this answer. michaelguoxy can you add some more tags e.g. "Privacy" and "Safari and Web" to see if the question garners more attention this way?