1

I think I have completed all the necessary steps for this, but it fails for some reason. This is the error I get:

Showing All Messages Undefined symbol: _OBJC_CLASS_$_HCKBeaconCentralManager

enter image description here

I have set the file in Build Settings:

enter image description here

This is the content of bridge file:

#import "HCKBeaconCentralManager.h"
#import "HCKBeaconInterface.h"
#import "HCKBeaconBaseModel.h"
#import "HCKBeaconProtocol.h"

Just in case this is code I use to try to call the SDK classes:

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) {
    }
}
Cœur
  • 34,719
  • 24
  • 185
  • 251
somerandomusername
  • 1,861
  • 4
  • 20
  • 51

1 Answers1

4

Add your Objective-C files into Xcode->Targets->Build Phases->Compile Sources.

Aleksey Potapov
  • 3,551
  • 5
  • 41
  • 64