我想我已经完成了所有必要的步骤,但由于某种原因它失败了。这是我得到的错误:
显示所有消息未定义符号:_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) {
}
}