Nearby Interaction

RSS for tag

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

Posts under Nearby Interaction tag

134 Posts

Post

Replies

Boosts

Views

Activity

NISession creation not working
Hello everyone, I want to create a NISession instance in my code but anywhere I call NISession() the simulator crashes with no error code. I followed the tutorial from apple about NearbyInteraction and downloaded their sample code and even there the NISession creation causes the app to crash. I updated my Mac to the latest version (Ventura 13.1) but this didn't fix the problem neither. I hope you can help me.
7
4
2.1k
Mar ’23
UWB Signal Direction in Background Mode between two Devices (iPhones)
Hey Folks, I am a bit stuck on creating UWB session between two iPhones in background mode of the application. The UWB works fine on foreground mode of the application but it doesn't work in background. I get error of invalid configuration and while searching on stackoverflow I get the answer that the discovery tokens are invalid. Can anyone please guide me if someone has done it in background mode. Getting this error: Error: Error Domain=com.apple.NearbyInteraction Code=-5888 “NIERROR_INVALID_CONFIGURATION_DESCRIPTION” UserInfo={NSLocalizedRecoverySuggestion=NIERROR_INVALID_CONFIGURATION_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_INVALID_CONFIGURATION_DESCRIPTION, NSLocalizedFailureReason=NIERROR_INVALID_CONFIGURATION_FAILURE_REASON}
2
0
2.3k
Feb ’23
Near By Interactions in background mode wwdc22
Anyone here who implemented apple nearby interactions I'm continously getting this error and unable to resolve this. I'm getting accessoryData from BLE device chractristics and bluetooth identifier of connected BLE device. let config = try NINearbyAccessoryConfiguration(accessoryData: accessoryData,                                                             bluetoothPeerIdentifier: peerIdentifier) Error: Error Domain=com.apple.NearbyInteraction Code=-5888 "NIERROR_INVALID_CONFIGURATION_DESCRIPTION" UserInfo={NSLocalizedRecoverySuggestion=NIERROR_INVALID_CONFIGURATION_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_INVALID_CONFIGURATION_DESCRIPTION, NSLocalizedFailureReason=NIERROR_INVALID_CONFIGURATION_FAILURE_REASON}
0
1
1.6k
Nov ’22
UWB-based communication with multiple devices
Can I use Nearby interaction to determine the location of 3 or more devices? I learned that by adding a session through the article below, I can interact with multiple devices. My question is, is it possible to make session A connect only with device A and session B only with device B? I've just started studying development, so I don't have a lot of knowledge. Thanks a lot for your help.
3
0
3.1k
Oct ’22
Nearby Interactions
Hi, I was wondering if anyone know of ways to use the Nearby Interactions API with a Javascript backend application. We have an app that we want to interact with a UWB device but want to wrap the api so in the future we can make it compatible with other phone provider's UWB apis. This is for a personal Senior Design Project, so I would appreciate any help. Thanks!
0
0
1.7k
Oct ’22
Required data link for Nearby Interaction?
Can I start a nearby interaction session with an accessory device without first establishing a data link? My team has done UWB development between two Qorvo boards (DWM3001C) but are now interested in bringing in the iOS UWB. We’ve had great success with UWB connections without using Bluetooth between Qorvo boards and I figured that the process would be similar for an iOS device. Going through the documentation, it seems that a data link (typically Bluetooth) is required to start a session. We were hoping to take this out of the protocol all together and hard code the accessory and iOS UWB configurations. Is this possible?
0
0
1.5k
Oct ’22
How to set visionAssistanceEnabled flag in NISession
I would like to get the direction value from NISession, from the document, it said "On iPhone, it’s possible to receieve direction for nearby third-party accessories in sessions that enable visionAssistanceEnabled" but i have no idea how to enable it as there is no member belong to NISession, plus deviceCapabilities is only available in IOS 16+ anyone has idea?
1
0
1.2k
Oct ’22
Nearby Interaction
Hello! Whether the Nearby Interaction can interact with multiple Third-Party Accessories devices? I've tried creating a separate session for each nearby object, but only the later session is active. The early session was active at the first, and was inactive when the later session start, I'm sure that each session and accessory has unique discoveryToken... Can someone help me? Thanks!
1
0
1.1k
Sep ’22
background TWR Session Respose in myapp
In my app, I have configured BackGround Session like the following code. var peerIdentifier = peripheral!.identifier do { configuration = try NINearbyAccessoryConfiguration(accessoryData: accessoryData, bluetoothPeerIdentifier: peerIdentifier) (configuration!.accessoryDiscoveryToken.description) : (devicename) : (peerIdentifier)") }catch{ return } cacheToken(configuration!.accessoryDiscoveryToken, accessoryName: devicename) nisession?.run(configuration!) However, the Delegate setting does not receive a response whether it is an error func session(_ session: NISession, didUpdate nearObjects: [NINearbyObject]) Is there a way to receive NINearbyObject in the background? If not, is there a way to get a sample code on how to measure the background distance? When using 'nisession.delegate = self ' in background UserInfo={NSLocalizedRecoverySuggestion=NIERROR_SESSION_FAILED_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_SESSION_FAILED_DESCRIPTION, NSLocalizedFailureReason=This session object is invalidated. Dispose of it and create a new one instead.}
1
0
1.3k
Sep ’22
Direction is NIL using iOS 16 BETA NearbyInteraction framework
Hi all, Recently I updated my app, which is using NearbyInteraction framework and was working great in iOS 15.x, to use new NearbyInteraction APIs introduced in iOS16. The main reason I want to test new APIs is to enable background sessions as explained in WWDC2022-10008. Actually background session is working ok with my third-party accessory, I can bring the app to the background and then back to the foreground and the Nearby Session does not get invalidated. However, I noticed that now using latest API the direction I receive is always null. I am using this API to create the session: "init(accessoryData:bluetoothPeerIdentifier:)" The ranging starts, but distance is nil in didUpdate delegate callback: "func session(_ session: NISession, didUpdate nearbyObjects: [NINearbyObject])" This same code was working before, I would get the direction out of myObject.direction. I tested setting isCameraAssistanceEnabled to true, even tried adding ARSession as in WWDC just in case, but direction and estimated horizontal and vertical angles are always nil. Is there anything I am missing? Any hint how to get this fixed? Regards.
1
0
1.5k
Sep ’22
When does [NIExportedObjectForwarder didUpdateNearbyObjects] get called?
I'm testing some nearby interaction on simulators. I was able to get updates in NISession but my app crashes unexpectedly. I have checked that the session is not getting invalidated. The errors have to do with NIExportedObjectForwarder. Can anyone explain what it does or what's causing this error? 2022-06-14 17:09:23.895783-0700 Threads[23791:8863595] -[NIExportedObjectForwarder didUpdateNearbyObjects:]: unrecognized selector sent to instance 0x600002d12550 2022-06-14 17:09:23.896240-0700 Threads[23791:8863595] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NIExportedObjectForwarder didUpdateNearbyObjects:]: unrecognized selector sent to instance 0x600002d12550' *** First throw call stack: ( 0   CoreFoundation                      0x00000001072e3d70 __exceptionPreprocess + 236 1   libobjc.A.dylib                     0x0000000104ffe14c objc_exception_throw + 56 2   CoreFoundation                      0x00000001072f32f4 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0 3   CoreFoundation                      0x00000001072e7fe0 ___forwarding___ + 1440 4   CoreFoundation                      0x00000001072ea07c _CF_forwarding_prep_0 + 92 5   NearbyInteraction                   0x0000000105100c74 -[NIServerConnection _sendDistanceUpdateForRequestedPeer:forPeer:] + 1544 6   NearbyInteraction                   0x0000000105100e18 -[NIServerConnection handleDistanceUpdate:] + 312 7   NearbyInteraction                   0x0000000105101e0c __54-[NIServerConnection handleEventFromSimulatorOnQueue:]_block_invoke + 316 8   libdispatch.dylib                   0x000000010657833c _dispatch_call_block_and_release + 24 9   libdispatch.dylib                   0x0000000106579b94 _dispatch_client_callout + 16 10  libdispatch.dylib                   0x0000000106580cc4 _dispatch_lane_serial_drain + 764 11  libdispatch.dylib                   0x0000000106581978 _dispatch_lane_invoke + 436 12  libdispatch.dylib                   0x000000010658da00 _dispatch_workloop_worker_thread + 812 13  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284 14  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8 ) libc++abi: terminating with uncaught exception of type NSException
1
0
892
Jun ’22
Why is there a limit on the number of nearby objects of a single session
Hi, The documentation for NISession says: One session represents an interaction between the user and a single nearby object. To interact with multiple nearby objects, create a separate session for each. However, NISessionDelegate method session (NISession,  didUpdate : [NINearbyObject]) take multiple nearby objects as a parameter. I find these two contradicting each other. Is it even possible to add multiple peers for a single session? If so, what's the best practice to do that? JK
0
0
1.1k
Jun ’22
Multicast on third-party devices
Hello, I wonder if multicast is possible on the third-party device side. If I understand correctly, all devices in a multicast session have the same session ID. As the iPhone decides this parameter, I will never be able to use this feature on my third-party device. Am I correct ? Is it possible to connect more than 5 iPhone to a third-party UWB device ? Thanks for reading me!
1
0
1.4k
Jun ’22
NISession creation not working
Hello everyone, I want to create a NISession instance in my code but anywhere I call NISession() the simulator crashes with no error code. I followed the tutorial from apple about NearbyInteraction and downloaded their sample code and even there the NISession creation causes the app to crash. I updated my Mac to the latest version (Ventura 13.1) but this didn't fix the problem neither. I hope you can help me.
Replies
7
Boosts
4
Views
2.1k
Activity
Mar ’23
UWB Signal Direction in Background Mode between two Devices (iPhones)
Hey Folks, I am a bit stuck on creating UWB session between two iPhones in background mode of the application. The UWB works fine on foreground mode of the application but it doesn't work in background. I get error of invalid configuration and while searching on stackoverflow I get the answer that the discovery tokens are invalid. Can anyone please guide me if someone has done it in background mode. Getting this error: Error: Error Domain=com.apple.NearbyInteraction Code=-5888 “NIERROR_INVALID_CONFIGURATION_DESCRIPTION” UserInfo={NSLocalizedRecoverySuggestion=NIERROR_INVALID_CONFIGURATION_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_INVALID_CONFIGURATION_DESCRIPTION, NSLocalizedFailureReason=NIERROR_INVALID_CONFIGURATION_FAILURE_REASON}
Replies
2
Boosts
0
Views
2.3k
Activity
Feb ’23
Is Direction meansurement working in Iphone14
I am developing nearbyinteraction Apps, where the direction is not working in Iphone 14, while it works fine in Iphone 11,12,13.. when I try to check the availability isSupported = NISession.deviceCapabilities.supportsDirectionMeasurement Iphone 14 shows not support. Can anyone know more details?
Replies
1
Boosts
1
Views
1.3k
Activity
Feb ’23
Is it possible to get the distance between iPhone to AirPods with Nearby Interaction API?
I found that this is possible on Apple Watch and iPhone devices from Apple's resources, but I haven't seen anything about AirPods and AirTags. I'm wondering is it possible or not.
Replies
0
Boosts
1
Views
781
Activity
Jan ’23
AirTag API
When will apple release APIs to integrate support for AirTag in developer's apps?
Replies
4
Boosts
0
Views
9.4k
Activity
Dec ’22
In the Nearby Interaction framework
Is there any way to set data such as CH, data rate, and Preamble length?
Replies
0
Boosts
0
Views
1.1k
Activity
Dec ’22
Privacy - Location Always Usage Description
I would like to know if it is a reason for rejection in app store connect to add the Privacy - Location Always Usage Description permission when the ios developer target is ios 11?
Replies
0
Boosts
0
Views
949
Activity
Nov ’22
Near By Interactions in background mode wwdc22
Anyone here who implemented apple nearby interactions I'm continously getting this error and unable to resolve this. I'm getting accessoryData from BLE device chractristics and bluetooth identifier of connected BLE device. let config = try NINearbyAccessoryConfiguration(accessoryData: accessoryData,                                                             bluetoothPeerIdentifier: peerIdentifier) Error: Error Domain=com.apple.NearbyInteraction Code=-5888 "NIERROR_INVALID_CONFIGURATION_DESCRIPTION" UserInfo={NSLocalizedRecoverySuggestion=NIERROR_INVALID_CONFIGURATION_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_INVALID_CONFIGURATION_DESCRIPTION, NSLocalizedFailureReason=NIERROR_INVALID_CONFIGURATION_FAILURE_REASON}
Replies
0
Boosts
1
Views
1.6k
Activity
Nov ’22
UWB-based communication with multiple devices
Can I use Nearby interaction to determine the location of 3 or more devices? I learned that by adding a session through the article below, I can interact with multiple devices. My question is, is it possible to make session A connect only with device A and session B only with device B? I've just started studying development, so I don't have a lot of knowledge. Thanks a lot for your help.
Replies
3
Boosts
0
Views
3.1k
Activity
Oct ’22
Nearby Interactions
Hi, I was wondering if anyone know of ways to use the Nearby Interactions API with a Javascript backend application. We have an app that we want to interact with a UWB device but want to wrap the api so in the future we can make it compatible with other phone provider's UWB apis. This is for a personal Senior Design Project, so I would appreciate any help. Thanks!
Replies
0
Boosts
0
Views
1.7k
Activity
Oct ’22
Required data link for Nearby Interaction?
Can I start a nearby interaction session with an accessory device without first establishing a data link? My team has done UWB development between two Qorvo boards (DWM3001C) but are now interested in bringing in the iOS UWB. We’ve had great success with UWB connections without using Bluetooth between Qorvo boards and I figured that the process would be similar for an iOS device. Going through the documentation, it seems that a data link (typically Bluetooth) is required to start a session. We were hoping to take this out of the protocol all together and hard code the accessory and iOS UWB configurations. Is this possible?
Replies
0
Boosts
0
Views
1.5k
Activity
Oct ’22
How to set visionAssistanceEnabled flag in NISession
I would like to get the direction value from NISession, from the document, it said "On iPhone, it’s possible to receieve direction for nearby third-party accessories in sessions that enable visionAssistanceEnabled" but i have no idea how to enable it as there is no member belong to NISession, plus deviceCapabilities is only available in IOS 16+ anyone has idea?
Replies
1
Boosts
0
Views
1.2k
Activity
Oct ’22
Sending Custom message (U1Chip) Nearby Interaction
Hello Everyone! I Am currently trying out the U1 chip on iPhones using the NearbyInteraction framework. I wanted to ask If there is a way that I can send custom data using the NISession.
Replies
1
Boosts
1
Views
1.1k
Activity
Oct ’22
Nearby Interaction
Hello! Whether the Nearby Interaction can interact with multiple Third-Party Accessories devices? I've tried creating a separate session for each nearby object, but only the later session is active. The early session was active at the first, and was inactive when the later session start, I'm sure that each session and accessory has unique discoveryToken... Can someone help me? Thanks!
Replies
1
Boosts
0
Views
1.1k
Activity
Sep ’22
background TWR Session Respose in myapp
In my app, I have configured BackGround Session like the following code. var peerIdentifier = peripheral!.identifier do { configuration = try NINearbyAccessoryConfiguration(accessoryData: accessoryData, bluetoothPeerIdentifier: peerIdentifier) (configuration!.accessoryDiscoveryToken.description) : (devicename) : (peerIdentifier)") }catch{ return } cacheToken(configuration!.accessoryDiscoveryToken, accessoryName: devicename) nisession?.run(configuration!) However, the Delegate setting does not receive a response whether it is an error func session(_ session: NISession, didUpdate nearObjects: [NINearbyObject]) Is there a way to receive NINearbyObject in the background? If not, is there a way to get a sample code on how to measure the background distance? When using 'nisession.delegate = self ' in background UserInfo={NSLocalizedRecoverySuggestion=NIERROR_SESSION_FAILED_RECOVERY_SUGGESTION, NSLocalizedDescription=NIERROR_SESSION_FAILED_DESCRIPTION, NSLocalizedFailureReason=This session object is invalidated. Dispose of it and create a new one instead.}
Replies
1
Boosts
0
Views
1.3k
Activity
Sep ’22
Direction is NIL using iOS 16 BETA NearbyInteraction framework
Hi all, Recently I updated my app, which is using NearbyInteraction framework and was working great in iOS 15.x, to use new NearbyInteraction APIs introduced in iOS16. The main reason I want to test new APIs is to enable background sessions as explained in WWDC2022-10008. Actually background session is working ok with my third-party accessory, I can bring the app to the background and then back to the foreground and the Nearby Session does not get invalidated. However, I noticed that now using latest API the direction I receive is always null. I am using this API to create the session: "init(accessoryData:bluetoothPeerIdentifier:)" The ranging starts, but distance is nil in didUpdate delegate callback: "func session(_ session: NISession, didUpdate nearbyObjects: [NINearbyObject])" This same code was working before, I would get the direction out of myObject.direction. I tested setting isCameraAssistanceEnabled to true, even tried adding ARSession as in WWDC just in case, but direction and estimated horizontal and vertical angles are always nil. Is there anything I am missing? Any hint how to get this fixed? Regards.
Replies
1
Boosts
0
Views
1.5k
Activity
Sep ’22
session(_:didRemove:reason:) called with wrong reason
The document says session(_:didRemove:reason:) is called when a peer has ended his session by calling its invalidate(). I expect the removal reason to be .peerEnded but I get .timeout.
Replies
1
Boosts
0
Views
810
Activity
Jul ’22
When does [NIExportedObjectForwarder didUpdateNearbyObjects] get called?
I'm testing some nearby interaction on simulators. I was able to get updates in NISession but my app crashes unexpectedly. I have checked that the session is not getting invalidated. The errors have to do with NIExportedObjectForwarder. Can anyone explain what it does or what's causing this error? 2022-06-14 17:09:23.895783-0700 Threads[23791:8863595] -[NIExportedObjectForwarder didUpdateNearbyObjects:]: unrecognized selector sent to instance 0x600002d12550 2022-06-14 17:09:23.896240-0700 Threads[23791:8863595] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NIExportedObjectForwarder didUpdateNearbyObjects:]: unrecognized selector sent to instance 0x600002d12550' *** First throw call stack: ( 0   CoreFoundation                      0x00000001072e3d70 __exceptionPreprocess + 236 1   libobjc.A.dylib                     0x0000000104ffe14c objc_exception_throw + 56 2   CoreFoundation                      0x00000001072f32f4 +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0 3   CoreFoundation                      0x00000001072e7fe0 ___forwarding___ + 1440 4   CoreFoundation                      0x00000001072ea07c _CF_forwarding_prep_0 + 92 5   NearbyInteraction                   0x0000000105100c74 -[NIServerConnection _sendDistanceUpdateForRequestedPeer:forPeer:] + 1544 6   NearbyInteraction                   0x0000000105100e18 -[NIServerConnection handleDistanceUpdate:] + 312 7   NearbyInteraction                   0x0000000105101e0c __54-[NIServerConnection handleEventFromSimulatorOnQueue:]_block_invoke + 316 8   libdispatch.dylib                   0x000000010657833c _dispatch_call_block_and_release + 24 9   libdispatch.dylib                   0x0000000106579b94 _dispatch_client_callout + 16 10  libdispatch.dylib                   0x0000000106580cc4 _dispatch_lane_serial_drain + 764 11  libdispatch.dylib                   0x0000000106581978 _dispatch_lane_invoke + 436 12  libdispatch.dylib                   0x000000010658da00 _dispatch_workloop_worker_thread + 812 13  libsystem_pthread.dylib             0x00000001cc0adb40 _pthread_wqthread + 284 14  libsystem_pthread.dylib             0x00000001cc0ac904 start_wqthread + 8 ) libc++abi: terminating with uncaught exception of type NSException
Replies
1
Boosts
0
Views
892
Activity
Jun ’22
Why is there a limit on the number of nearby objects of a single session
Hi, The documentation for NISession says: One session represents an interaction between the user and a single nearby object. To interact with multiple nearby objects, create a separate session for each. However, NISessionDelegate method session (NISession,  didUpdate : [NINearbyObject]) take multiple nearby objects as a parameter. I find these two contradicting each other. Is it even possible to add multiple peers for a single session? If so, what's the best practice to do that? JK
Replies
0
Boosts
0
Views
1.1k
Activity
Jun ’22
Multicast on third-party devices
Hello, I wonder if multicast is possible on the third-party device side. If I understand correctly, all devices in a multicast session have the same session ID. As the iPhone decides this parameter, I will never be able to use this feature on my third-party device. Am I correct ? Is it possible to connect more than 5 iPhone to a third-party UWB device ? Thanks for reading me!
Replies
1
Boosts
0
Views
1.4k
Activity
Jun ’22