我正试图使ios应用程序和osx应用程序之间相互通信。一切都很好,直到"邀请同行"。部分。我得到了下面的错误:
2022-07-18 17:45:10.066594+0800 iRemoteMac[42755:5561655] [connection] nw_socket_handle_socket_event [C6:1] Socket SO_ERROR [54: Connection reset by peer]
2022-07-18 17:45:10.067320+0800 iRemoteMac[42755:5558565] [MCNearbyServiceAdvertiser] PeerConnection connectedHandler (advertiser side) - error [Unable to connect].
2022-07-18 17:45:10.067366+0800 iRemoteMac[42755:5558565] [MCNearbyServiceAdvertiser] PeerConnection connectedHandler remoteServiceName is nil.
2022-07-18 17:45:20.050295+0800 iRemoteMac[42755:5562197] [MCNearbyServiceAdvertiser] Data from peer [My Dev,721645DB] received with error Connection closed.
你知道是什么导致了这个错误吗?我没有看到remoteServiceName在哪里。
感谢嗯,我没有设置MCNearbyServiceAdvertiserDelegate正确,这就是为什么我不能邀请同行,但有时我仍然得到这个错误,虽然连接可以设置。