ios - 在 project-swift.h 中找不到协议声明
问题描述
我正在尝试构建我的项目,但出现以下错误:
找不到“CBCentralManagerDelegate”的协议声明;你的意思是'CLLocationManagerDelegate'吗?```
找不到“CBPeripheralDelegate”的协议声明```
在我的Project-Swift.h
文件中的这段代码上
@class CBService;
@class CBCharacteristic;
@interface KestrelDeviceConnect (SWIFT_EXTENSION(FieldView)) <CBCentralManagerDelegate, CBPeripheralDelegate>
任何人都知道问题是什么以及如何解决它?
解决方案
好像我需要在Project-Bridging-Header.h
#import <CoreBluetooth/CoreBluetooth.h>
推荐阅读
- php - What was wrong in this command I always got this error #1241 - Operand should contain 1 column(s)
- c# - 由于主键约束冲突,无法添加新用户声明
- momentjs - Moment.js - 将数组中的 int 数字转换为小时:分钟格式
- java - 如何将 java.net.http.HttpRequest 正文读取为字节数组(字节 [])?
- javascript - setState() 不采取进一步的论点 (e) 来改变价值
- github - 当我知道密码和个人资料信息正确时,我对为什么无法登录 Github 感到困惑
- c# - 使用静态工厂模式时如何避免分支?
- html - css中不等的卡片大小
- spring-boot - 如何在 Spring Boot Rest 调用中传递 Date 类型的值?
- java - 我可以在 windows run.bat 文件中屏蔽/加密输入文本(例如密码)吗?