iOS Multipeer connectivity framework invitationHandler doesn't seem to accept?

后端 未结 4 464
囚心锁ツ
囚心锁ツ 2020-12-30 10:35

I\'m using the mutlipeer connectivity framework for the first time, and I want programmatic ( not with the assistant classes) control.

Everything is working exactly

4条回答
  •  猫巷女王i
    2020-12-30 11:16

    There is a bug that Apple is aware of apparently.

    This is what led to the discovery: Why does my MCSession peer disconnect randomly?

    You must implement the following delegate callback even though it is listed as optional in the docs...

    - (void) session:(MCSession *)session didReceiveCertificate:(NSArray *)certificate fromPeer:(MCPeerID *)peerID certificateHandler:(void (^)(BOOL accept))certificateHandler
    {
     certificateHandler(YES);
    }
    

提交回复
热议问题