gpt4 book ai didi

ios - Swift - MultipeerConnectivity 类型不符合协议(protocol)

转载 作者:搜寻专家 更新时间:2023-10-31 22:00:27 27 4
gpt4 key购买 nike

我正在尝试 this tutorial代码有问题:

class MPCManager: NSObject, MCSessionDelegate, MCNearbyServiceBrowserDelegate, MCNearbyServiceAdvertiserDelegate {

我遇到了一个错误:

Type 'MPCManager' does not comform to protocol 'MCSessionDelegate'

Type 'MPCManager' does not comform to protocol 'MCNearbyServiceBrowserDelegate'

Type 'MPCManager' does not comform to protocol 'MCNearbyServiceAdvertiserDelegate'

但是我下载了示例文件却没有出现同样的错误。我错过了哪一部分?

最佳答案

如果你想遵守这些协议(protocol),你需要实现 MCSessionDelegateMCNearbyServiceBrowserDelegateMCNearbyServiceAdvertiserDelegate 所有必需的委托(delegate)方法。

关于ios - Swift - MultipeerConnectivity 类型不符合协议(protocol),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31134025/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com