Nearby Interaction

RSS for tag

Locate and interact with nearby devices using distance, direction, and identifier.

Posts under Nearby Interaction tag

20 Posts

Post

Replies

Boosts

Views

Activity

Direction data not available with U2 chip (iPhone 15 Pro and iPhone 16 Pro) when using Murata SR040/SR150 accessory
Hello, I am developing with the Nearby Interaction framework using third-party UWB accessories (Murata SR040/SR150). I observed a difference between U1-based and U2-based iPhones: iPhone 12 Pro (U1 chip) NINearbyObject.direction returns valid 3D vector (x, y, z). Distance and direction both work as expected. iPhone 15 Pro and iPhone 16 Pro (U2 chip) NINearbyObject.direction is always nil. Only distance is returned (around 0.35–0.40 m in my test). Effectively behaves as "distance-only mode". Environment: Hardware: iPhone 12 Pro, iPhone 15 Pro iOS version: 18.5 Accessory: Murata UWB SR040 / SR150 App: Using NINearbyAccessoryConfiguration with BLE-based discovery Info.plist includes NSNearbyInteractionUsageDescription Camera assistance was tested both ON and OFF Expectation: I expected the U2 chip to behave consistently with U1, i.e. provide direction vectors when possible. Instead, on iPhone 15 Pro, direction is always unavailable (nil) while distance is returned correctly. Questions: Is this an intentional limitation for U2 chip + third-party accessories? Is there a new requirement (e.g. certification, firmware update, capability flags) to enable direction on U2 devices? Could this be related to NIDeviceCapability or the new Extended Distance Measurement (EDM) mode in U2? Thanks in advance for any clarification.
0
0
20
1d
Nearby Interactions, wih camera assistance
I have an app that uses nearby with a custom accessory. works great on iPhone 11-13, starting with iPhone 14, one must use ARkit to get angles we have two problems ARkit is light sensitive, and we do not control the lighting where this app would run.. the 11-13 action works great even in the dark. (our users are blind, this is an accessibility app) ARkit wants to be foreground, but our uses cannot see it, and we have a voice oriented UI that provides navigation instructions.. IF ARkit is foreground, our app doesn't work. with iPhone 15 ProMax, on IOS 18, I got an error, access denied. (not permission denied) now that I am on IOS 26.. bt scan doesn't happen also fails same way on iPhone 17 on IOS26, can't callback now as release signing is no longer done this same code works ok on iOS 17.1 on iPhone 12. Info.plist here info.txt if(SearchedServices == [] ){ services = [TransferService.serviceUUID,QorvoNIService.serviceUUID] } logger.info( "scannerready, starting scan for peripherals \(services) and devices \(IDs)") filteredIDs=IDs; scanning=true; centralManager.scanForPeripherals(withServices: services, options: [CBCentralManagerScanOptionAllowDuplicatesKey: true]) the calling code dataChannel.autoConnect=autoConnect; dataChannel.start(x,ids) // datachannel.start is above self.scanning = true; return "scanning started"; ... log output services from js = and devices= 5FE04CBB services in implementation = bluetooth ready, starting scan for peripherals [] and devices ["5FE04CBB"] scannerready, starting scan for peripherals [6E400001-B5A3-F393-E0A9-E50E24DCCA9E, 2E938FD0-6A61-11ED-A1EB-0242AC120002] and devices ["5FE04CBB"] ⚡️ TO JS {"value":"scanning started"}
1
0
463
6d
Nearby Interaction / DL-TDoA (Beta): Need NITLDOA params; 16 Pro shows distance-only, 13 has direction
Apple recently announced DL-TDoA (Downlink TDoA) support on iOS 26, and the API is currently marked Beta. Using two iPhones (16 Pro and 13) on iOS 26.0 Beta, I’m starting a Nearby Interaction session and need to read NITLDOA parameters (address, carrier frequency offset, signal strength/RSSI), but I can’t find a supported way. I’m also seeing asymmetry: iPhone 13 reports distance+direction, while 16 Pro reports distance only. Is there a supported workflow/API to access those parameters, and any known device/OS constraints that would cause direction to be unavailable on 16 Pro?
0
1
168
4w
DL-TDoA support using Nearby Interaction framework
Hi, Apple recently announced DL-TDoA (Downlink TDoA) support on iOS26. This API is currently marked as Beta. We are working on integrating this functionality into our app, already added the APIs and tried to configure a new DL-TDoA session using NIDLTDOAConfiguration (the only parameter it takes is networkIdentifer). The session is configured but automatically invalidated by the OS. When is DL-TDoA expected to be fully supported by phones? Can we expect a detailed documentation or specification explaining how to arrange the session with the DT-Anchors (channel, ranging duration, ...)? Do we need Bluetooth LE connection with the anchors while running DL-TDoA? We already have the 4 DT-Anchors (1 initiator and 3 responders) ready, looking forward to be able to test this new exciting feature and get DL-TDoA measurements to trilaterate the phone position within a map. Regards.
0
2
105
Aug ’25
I am not enable to use Nearby Interactions.
Hello there, I am trying to add Nearby Interaction into my project, but it is not appear into +capabilities. I have already go to my account into developer account platform to try to add it from Identifiers: Then I search into my project to activated, but Nearby Interaction was not show: So, there is anything else that i have miss? please help :c
2
0
88
Aug ’25
Duplicate timestamps in UWB (Nearby Interaction) updates.
Hello, We are using NearbyInteraction to get the distance between an iPhone and Apple Watch. Overall it works pretty well, but we are noticing that it sometimes produces duplicate (or near duplicate) timestamps. Here is an example of the data produced (time is in seconds since scan start): 0: 1.882862 1: 1.88296 2: 1.981459 3: 1.981495 4: 2.080235 5: 2.080397 As you can see there's a pattern where two updates have very similar timestamps. This seems to only happen when using 2 U2 chips together. Is this an expected behavior? If so, why? The timestamps are calculated using: let bootTimeInterval = bootTime() func bootTime() -> TimeInterval { let uptime = ProcessInfo.processInfo.systemUptime let nowTimeIntervalSince1970 = Date().timeIntervalSince1970 return nowTimeIntervalSince1970 - uptime } // Then later on each NISession update... let timestamp = bootTimeInterval + ProcessInfo.processInfo.systemUptime The app produces unix timestamps but I have converted them to be relative to the start of the scan to be easier to read. Note that bootTimeInterval is calculated once at the start of the app, so all timestamps produced on a UWB update should be using the same clock. Things I've confirmed: The NISession is only able to connect to one device, so it is not coming from a different device. Any feedback is appreciated, thank you.
0
0
41
Aug ’25
UWB Background Ranging with Live Activities - iOS 18.4
I’m developing an app that uses UWB for proximity detection between users. I have questions about iOS 18.4’s new Live Activity background UWB capabilities. Live Activity Background UWB “Loophole” Apple’s documentation states that apps can continue UWB ranging in background with “any supported device” if a Live Activity is started as the app backgrounds - without requiring Bluetooth LE pairing. Key Questions: 1. Background initiation: Can new UWB sessions be initiated between devices while in background using Live Activities, or must sessions start in foreground first? 2. No pairing requirement: Does this iOS 18.4 Live Activity approach truly eliminate the need for Bluetooth LE pairing for background UWB ranging? 3. Session persistence: How long can UWB ranging continue in background with an active Live Activity? 4. Testing without entitlement: Can I test UWB functionality between multiple devices in Xcode without the Nearby Interaction entitlement approved yet? Context My app needs precise proximity detection between users in real-time. The Live Activity background capability would be essential since users need to put phones away while the ranging continues. This iOS 18.4 feature seems like it could be a game-changer for apps requiring background UWB functionality without the complexity of Bluetooth pairing. Has anyone successfully implemented this Live Activity + background UWB approach?
0
0
171
Jul ’25
APP Background Keep-Alive
Dear Apple: We are developing an app for file sharing between mobile devices. We want to create an iOS app that can continue sharing files with other devices even when it is running in the background. We are using WLAN channels for file sharing. Could you please advise on which background persistence measures we should use to ensure the iOS app can maintain file transfer when it goes to the background? Thank you.
1
0
81
Apr ’25
Issue with UWB ranging on DWM3001CDK using NINearbyAccessoryConfiguration in Background mode
Hi, I’m trying to perform UWB ranging between an iPhone and a Qorvo DWM3001CDK accessory using Apple NI’s NINearbyAccessoryConfiguration class. I’ve followed the steps described in the official Apple documentation (https://developer.apple.com/documentation/nearbyinteraction/ninearbyaccessoryconfiguration), specifically for enabling background mode using the init(accessoryData:bluetoothPeerIdentifier:) initializer. The configuration is successfully created, and background mode is enabled. However, when the iPhone starts the session, I doesn’t receive any ranging data from the DWM3001CDK, and the session ends with a timeout. Interestingly, if I use the init(data:) initializer, I can successfully receive ranging data, but this only works in foreground mode, which doesn’t meet my requirements. Steps I’ve followed: Used Core Bluetooth to discover and pair the accessory. Retrieved the configuration data from the accessory according to the third-party UWB device specifications. Initialized the configuration using NINearbyAccessoryConfiguration(accessoryData:bluetoothPeerIdentifier:) for background mode. Started the session with NISession.run(configuration). Waited for updates in the delegate method session(_:didUpdate:). Specific questions: Are there additional requirements for using init(accessoryData:bluetoothPeerIdentifier:) to enable background UWB ranging with the DWM3001CDK? Is there a known difference in how init(data:) and init(accessoryData:bluetoothPeerIdentifier:) handle the ranging process? Any advice or insights would be greatly appreciated. Thanks in advance!
1
0
376
Mar ’25
Using Google Maps in App to determine distance
So far, we have been using Google Maps to determine distance along a certain route for a MacOS app to register kilometers for a business administration app. But, this is no longer possible, as the login for google maps no longer works. I understand we would have to pay to continue using the Google Maps service as it was and we would have to make changes to the app. That would be ok, but I was just wondering does any developer on this forum have suggestions on how to resolve this issue? Or even maybe have suggestions, to make this work better than before. Three suggestions by chatgpt: use ANWB route planner using google maps, Pro6pp, or to useWisp.Software (something I haven't heard of before. Your suggestions and ideas are welcome. Also, if the Apple Developer team knows of a way how to do this in your app, your advice is more than welcome. Have a nice day!
2
0
318
Feb ’25
NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_DESCRIPTION (Code=-5882) occurs when running NISession for Nearby Interaction.
Overview I am running a NearbyInteaction sample. Immediately after niSession.run(configuration!), func session(_ session: NISession, didInvalidateWith error: Error) is executed. The error is as follows, but I cannot find the cause. Error: bluetoothPeerIdentifier: AF5ADDC1-F731-7BAD-E8C5-9230E79F8C1A Session Invalidation Error: NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_DESCRIPTION Error Details:Error Domain=com.apple.NearbyInteraction Code=-5882 "NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_DESCRIPTION" UserInfo={NSLocalizedRecoverySuggestion=NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_DESCRIPTION, NSLocalizedFailureReason=NIERROR_ACCESSORY_PEER_DEVICE_UNAVAILABLE_FAILURE_REASON} The sample application worked well at first. I want the application to run in the background, so I made the following changes and had problems. Before change: configuration = try NINearbyAccessoryConfiguration(data: configData) After change: configuration = try NINearbyAccessoryConfiguration( accessoryData: configData, bluetoothPeerIdentifier: peerIdentifier) I see no problem with the application. It works fine on device A. The problem occurs on device B. Device A: NXP QN9090 - NXP SR150 Device B: Nordic nRF52840 - NXP SR150 I have confirmed that the device shows up in the settings app after pairing & bonding the device. I have confirmed that the iPhone and nRF52840 are still connected to the BLE without any problems when the error occurs. Initialization code for NearbyInteraction: func setupAccessory(_ configData: Data, name: String) { updateInfoLabel(with: "Received configuration data from '\(name)'. Running session.") do { guard let discoveredPeripheral = dataChannel.getDiscoveredPeripheral() else { return } let peerIdentifier = discoveredPeripheral.identifier configuration = try NINearbyAccessoryConfiguration( accessoryData: configData, bluetoothPeerIdentifier: peerIdentifier) } catch { // Stop and display the issue because the incoming data is invalid. // In your app, debug the accessory data to ensure an expected // format. updateInfoLabel( with: "Failed to create NINearbyAccessoryConfiguration for '\(name)'. Error: \(error)" ) return } // Cache the token to correlate updates with this accessory. cacheToken(configuration!.accessoryDiscoveryToken, accessoryName: name) niSession.run(configuration!) } Environment Xcode 16.1 iPhone11 (iOS 17.6.1) Target UWB Chip: NXP SR150 Sample iOS Application: https://developer.apple.com/documentation/nearbyinteraction/implementing-spatial-interactions-with-third-party-accessories
1
0
400
Feb ’25
Discovering peers from Apple TV app
I have an idea for a game where the Apple TV app acts as the host and discovers nearby iOS apps that can join the game. Each iOS app needs to be able to have the user draw, tap, etc and have all the events be delivered in real time to the Apple TV where the effects will be rendered immediately (imagine a co-op game played in your lounge room where guests user their own devices to control aspects of the UI on the shared Apple TV screen) MPC is discontinued and DeviceDiscoveryUI is limited to only a single iOS device so I’m trying to figure out the best way to do the P2P networking. Reading/watching videos suggests that using GKMatchMaker and friends seems like it might suffer from latency problems (because everything has to go via Game Centre - or does it?) plus I’m not sure how I’d deal with the fact that the owner of the Apple TV is likely to signed into the same game centre id on both the Apple TV and their own devices to which would mean they wouldnt be able to play because the host can’t invite “themselves” on another device (or can it?) Soooo… I’m looking for suggestions on how best to move forward. I’ve read https://developer.apple.com/documentation/technotes/tn3151-choosing-the-right-networking-api which is very useful but there’s no clear suggestion that would work. Using the Network for the real time messaging seems doable but dealing with discovery / invites seems like a massive pain that I’d prefer to use built-in libraries if possible. Any suggestions would be gladly received. Thanks a lot
3
0
479
Jan ’25
The UWB performance of iOS18 is different from that of iOS17
Hello, dear engineer: The UWB Accessory used by my APP has inconsistent code callbacks on iOS17 and iOS18. I have connected multiple UWB Accessory by Accessory Single Configuration Data (UUID: 95e8d9d5-d8ef-4721-9a4e-807375f53328) in the APP. In iOS17.5.1, the unconnected Accessory calls the func session in the NiSessionDelegate (_ session: NISession, didRemove nearbyObjects: [NINearbyObject], "reason: NINearbyObject RemovalReason)," reason is the timeout. iOS18.0.1 does not call didRemove and fails to connect automatically after 10 minutes on the disconnected Accessory. iOS18.2 does not call didRemove. After 10 minutes, when the Accessory is not connected, it automatically connects and starts ranging. Therefore, I would like to ask what is updated in iOS18 UWB? Is there a document for reference, or can you provide the callback performance of each iOS version for UWB? The code is as follows: niConfiguration = try NINearbyAccessoryConfiguration(data: Data(AccessoryUwbConfigData)) uwbSession.run(niConfiguration)
0
0
481
Dec ’24
Is it possible to connect a single third party UWB device (hardware or chip) to multiple iPhones at the same time?
Dear fellow iOS developers, I am interested in UWB technology and I am trying to build a dummy Indoor Navigation project. I will be placing 3 third party UWB devices (hardware or chips) at some distance apart from each other. I have 5 iPhones and I want to be able to connect all the 5 iPhones to the 3 UWB devices simultaneously and perform trilateration to get the iPhones x and y coordinates using the "distance" values obtained from the UWB devices (hardware or chips). I have tried this approach using Qorvo DWM3000 chips but problem is that after the first iPhone connection, the chip stops advertising itself. Is this approach possible? Also, it is compulsory to establish NISessions? Can't I skip creating NISessions? Thanks in advance. Forgive my english.
0
0
322
Dec ’24
Inquiry Regarding NSNearbyInteractionUsageDescription Permission Behavior on iOS 18
After declaring NSNearbyInteractionUsageDescription in accordance with the official documentation, a permission prompt used to appear asking if the user wants to allow Nearby Interaction permissions. Additionally, I could see two related permissions in the app’s settings. This behavior was working correctly on iOS 17. However, after upgrading to iOS 18, the permission prompt no longer appears upon reinstalling the app, and the related settings are no longer visible in the app settings. I would like to confirm if there are any additional configurations required for iOS 18 to make Nearby Interaction permissions function as expected. Thank you very much for your assistance. https://developer.apple.com/documentation/nearbyinteraction/initiating-and-maintaining-a-session ios 17: visable, ios 18 : gone
0
0
533
Oct ’24
Find My and Nearby Interaction Accessory
The Nearby Interaction Accessory Protocol Specification defines a lightweight, transport-agnostic, and application-level protocol that facilitates configuring, starting, and maintaining an Ultra Wideband (UWB) ranging session between an accessory and an Apple device. **An app on a supported UWBenabled Apple device is required in order to allow users to set up, configure, and use their accessories. Does this app need us to develop? Can I use the Find My app to add my accessories and use the UWB high-precision lookup feature?
3
0
1k
Oct ’24