【问题标题】:Cannot find protocol declarations in project-swift.h在 project-swift.h 中找不到协议声明
【发布时间】:2019-07-31 15:52:12
【问题描述】:

我正在尝试构建我的项目,但出现以下错误:

找不到“CBCentralManagerDelegate”的协议声明;你的意思是“CLLocationManagerDelegate”吗?```

找不到“CBPeripheralDelegate”的协议声明```

在我的Project-Swift.h 文件中的这段代码

@class CBService;
@class CBCharacteristic;

@interface KestrelDeviceConnect (SWIFT_EXTENSION(FieldView)) <CBCentralManagerDelegate, CBPeripheralDelegate>

有人知道问题是什么以及如何解决吗?

【问题讨论】:

    标签: ios swift xcode core-bluetooth


    【解决方案1】:

    好像我需要在Project-Bridging-Header.h中输入这行代码

    #import &lt;CoreBluetooth/CoreBluetooth.h&gt;

    【讨论】:

      猜你喜欢
      • 2011-09-20
      • 1970-01-01
      • 1970-01-01
      • 2015-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多