简体   繁体   中英

MultipeerConnectivity can't invite peer

I am trying to make an ios app and an osx app communicate between each other. Everything is good until the "invite peer" part. I got the errors bellow:

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.

Any ideas on what causes this error? I don't see where the remoteServiceName is.

thanks

好吧,我没有正确设置 MCNearbyServiceAdvertiserDelegate,这就是我无法邀请对等方的原因,但有时虽然可以设置连接,但我仍然会收到此错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM