Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Cannot detect UWB Beacons on iOS #73

@davidespano

Description

@davidespano

Hi all,

I am currently trying to run the sample code for getting into the near range of a single UWB beacon. I managed to run the app smoothly on an iPhone 14 through Xcode 14.3.1. I get no errors, but none of the zone events fires.

I cannot detect the beacons with the Estimote APP either, but they work smoothly on the Estimote UWB sample.

The app is so simple I can paste it here

import SwiftUI
import EstimoteProximitySDK

struct ContentView: View {

    @State var proximityObserver: ProximityObserver
    @State var message: String;
    
    init(){
        let credentials = CloudCredentials(appID: "dummyID", appToken: "dummyToken")
        proximityObserver = ProximityObserver(credentials: credentials,  onError: { error in
                print("Oops! \(error)")
        
        message = "Application Started"
    }
    
    func startLocating(){

        print("Location started")
        let blueberryZone = ProximityZone(tag: "lemon-set-1", range: ProximityRange.near)
        blueberryZone.onEnter = { zoneContext in
            print("Entered near range of tag 'lemon-set-1'. Attachments payload: \(zoneContext.attachments)")
        }
        blueberryZone.onExit = { zoneContext in
            print("Exited near range of tag 'lemon-set-1'. Attachment payload: \(zoneContext.attachments)")
        }

        blueberryZone.onContextChange = { contexts in
            print("Now in range of \(contexts.count) contexts")
        }

    
        proximityObserver.startObserving([blueberryZone])
    }
    
    func stopLocating() {
        proximityObserver.stopObservingZones()
    }
    
    var body: some View {
        VStack {
            Image(systemName: "globe")
                .imageScale(.large)
                .foregroundColor(.accentColor)
            Text(message)
            
            Button("Start") {
                startLocating()
                self.message = "Started Location Service"
            }
            .padding(.vertical)
            Button("Stop") {
                stopLocating()
                self.message = "Stopped Location Service"
            }
        }
        .padding()
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}

When running, the app log is

Location started
ℹ️Number of devices assigned to "lemon-set-1": 1
ℹ️Fetched tags from Cloud (total: 1)
ℹ️Fetched attachments from Cloud (total: 1)

Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions