我想我已经完成了所有必要的步骤,但由于某种原因失败了。这是我得到的错误:
显示所有未定义符号的消息:_OBJC_CLASS_$_HCKBeaconCentralManager

我已经在生成设置中设置了该文件:

这是桥文件的内容:
#import "HCKBeaconCentralManager.h"
#import "HCKBeaconInterface.h"
#import "HCKBeaconBaseModel.h"
#import "HCKBeaconProtocol.h"万一这是我尝试调用SDK类的代码:
import UIKit
import SwiftUI
import CoreLocation
import CoreBluetooth
@available(iOS 13.0, *)
class SceneDelegate: UIResponder, UIWindowSceneDelegate,HCKCentralScanDelegate {
func centralManagerScanNewDeviceModel(_ beaconModel: HCKBeaconBaseModel!, manager: HCKBeaconCentralManager!) {
print("centralManagerScanNewDeviceModel")
}
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
print("scene init")
HCKBeaconCentralManager.sharedInstance()?.scanDelegate = self
}
func sceneDidDisconnect(_ scene: UIScene) {
}
func sceneDidBecomeActive(_ scene: UIScene) {
}
func sceneWillResignActive(_ scene: UIScene) {
}
func sceneWillEnterForeground(_ scene: UIScene) {
}
func sceneDidEnterBackground(_ scene: UIScene) {
}
}发布于 2019-11-26 09:22:18
将目标-C文件添加到Xcode->目标值->构建阶段->编译源代码中。
https://stackoverflow.com/questions/59034407
复制相似问题