iOS 13 - Estimote SDK - Beacon ranging
Asked Answered
J

0

1

I've encountered problem with beacon ranging in iOS 13

Ranging Nearable stickers stop working

self.nearableManager.startRanging(forIdentifier: nearableIdentifier)

Nothing happens in delegate method:

func nearableManager(_ manager: ESTNearableManager, didRangeNearable nearable: ESTNearable) { }

UPDATE Error found:

Ranging nearables failed with error: Error Domain=com.estimote.nearables Code=301 "Blueooth is not powerd on." UserInfo={NSLocalizedDescription=Blueooth is not powerd on.}

When I use CBCentralManager() then in its delegate I am getting poweredOn status

func centralManagerDidUpdateState(_ central: CBCentralManager) {

        switch central.state {
          case .unknown:
            print("central.state is .unknown")
          case .resetting:
            print("central.state is .resetting")
          case .unsupported:
            print("central.state is .unsupported")
          case .unauthorized:
            print("central.state is .unauthorized")
          case .poweredOff:
            print("central.state is .poweredOff")
          case .poweredOn:
            print("central.state is .poweredOn")
        }
    }



private init(rangingTimeout: TimeInterval? = nil) {
        super.init()
        self.centralManager = CBCentralManager(delegate: self, queue: DispatchQueue.main)

        self.nearableManager.delegate = self
        self.rangingTimeout = rangingTimeout

        self.beaconManager.delegate = self
        self.beaconManager.requestAlwaysAuthorization()
    }

All this code is used in singleton object used on multiple screens of application.

class NearableTablesManager : NSObject {

    // MARK: - Singleton
    private static var shared : NearableTablesManager?

    static func shared(rangingTimeout: TimeInterval? = nil) -> NearableTablesManager {

        if shared == nil {
            shared = NearableTablesManager(rangingTimeout: rangingTimeout)
        }

        return shared!
    }
Junina answered 27/9, 2019 at 15:16 Comment(2)
nearableIdentifier is it constants/string variable ? make sure you are not assigning the same identifier to multiple regions, otherwise, the last one will only workSnowy
No one work. I am reading list of tables with assigned nearable id from API. Maybe I will check them once again there are really ok (but I doubt that identifiers changed in the meantime).Quincyquindecagon

© 2022 - 2024 — McMap. All rights reserved.