Post not yet marked as solved
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.
Post not yet marked as solved
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.
Post not yet marked as solved
Hi all
I am going to develop a software for third party-UWB chipset communication with U1.
From the document, third party chipset have to send the UWBConfigData to U1, but I have no idea how to fill in Manufacturer ID and UWB chipset model ID . anyone can help?
Terence
Post not yet marked as solved
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
Post not yet marked as solved
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
Post not yet marked as solved
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!
Post not yet marked as solved
Hello,
We are a company working on Ultra Wideband solutions and, hence, using Apple's NearbyInteraction framework to establish UWB Ranging sessions with our UWB-enabled third-party accessory.
This week we were excited about the new background UWB Ranging session possibility, which opens new use cases. The wwdc2022 10008 video that provides the technical details for this feature indicates that the third-party accessory is responsible to expose the Nearby Interaction GATT Server. We don't manage to get full details about what needs to be implemented to by compliant with Apple's framework.
The URL below indicates that full BLE details should be explained in the "Nearby Interaction Accessory Protocol Specification" but we don't see any info there.
https://developer.apple.com/documentation/nearbyinteraction/ninearbyaccessoryconfiguration
https://developer.apple.com/nearby-interaction/specification/
Can someone indicate us where the find full details for this background Nearby Interaction feature?
Thanks in advance.
Regards.
Post not yet marked as solved
I want to create a hands-free application (e.g. smart lock)using the Nearby Interaction framework.
Nearby Interaction sessions can only be active when the app is in the foreground, however, it can't be a complete hands-free application.
Does anyone have any good ideas?
Post not yet marked as solved
Hi there,
Im trying to use the Nearby Interactions, but when i do the import, XCode tells me that "File 'HomeViewController.swift' is part of module 'NearbyInteraction'; ignoring import" and when i want to create a NISession object it says that cant find NISession in this scope
Any fix for this?
Thank you
Post not yet marked as solved
Hello All,
I am facing one problem in the Nearby Interaction library, I want to connect multiple devices at the same time,
Right now NISession is disconnect itself when a new device comes in range and connect with a new device
My question is how can I connect with multiple devices at the same time and access the distance of all the connected devices.
This how i am using right now
final class NearbyInteractionManager: NSObject {
static let instance = NearbyInteractionManager()
var sessionNI: NISession?
weak var delegate: NearbyInteractionManagerDelegate?
func start() {
sessionNI = NISession()
sessionNI?.delegate = self
MultipeerConnectivityManager.instance.delegate = self
MultipeerConnectivityManager.instance.startBrowsingForPeers()
}
private var discoveryTokenData: Data {
guard let token = sessionNI?.discoveryToken,
let data = try? NSKeyedArchiver.archivedData(withRootObject: token, requiringSecureCoding: true) else {
fatalError("can't convert token to data")
}
return data
}
}
extension NearbyInteractionManager: MultipeerConnectivityManagerDelegate {
func connectedDevicesChanged(devices: [String]) {
print("connected devices changed \(devices)")
}
func connectedToDevice() {
print("connected to device")
MultipeerConnectivityManager.instance.shareDiscoveryToken(data: discoveryTokenData)
}
func receivedDiscoveryToken(data: Data) {
print("data received")
guard let token = try? NSKeyedUnarchiver.unarchivedObject(ofClass: NIDiscoveryToken.self, from: data) else {
fatalError("Unexpectedly failed to encode discovery token.")
}
let configuration = NINearbyPeerConfiguration(peerToken: token)
sessionNI?.run(configuration)
}
}
// MARK: - NISessionDelegate
extension NearbyInteractionManager: NISessionDelegate {
func session(_ session: NISession, didUpdate nearbyObjects: [NINearbyObject]) {
delegate?.didUpdateNearbyObjects(objects: nearbyObjects, token: nearbyObjects[0].discoveryToken)
}
func session(_ session: NISession, didRemove nearbyObjects: [NINearbyObject], reason: NINearbyObject.RemovalReason) {}
func sessionWasSuspended(_ session: NISession) {}
func sessionSuspensionEnded(_ session: NISession) {}
func session(_ session: NISession, didInvalidateWith error: Error) {}
}
protocol NearbyInteractionManagerDelegate: class {
func didUpdateNearbyObjects(objects: [NINearbyObject], token: NIDiscoveryToken)
}
Any update will be very helpful full
Thank you
Post not yet marked as solved
Hi,
My sample work fine with 2 sessions on simulators, but don't work between 2 devices (iPhone 11 Pro and iPhone 13 Pro), or one device and one simulator. (iOS 14)
I get didInvalidateWith Error (Domain=com.apple.NearbyInteraction Code=-5884).
I re-tried with new session on error, but don't work.
Any suggestion?
Thanks
Post not yet marked as solved
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.
Post not yet marked as solved
Can we broadcast light custom application data using ultra U1 technology without BT/Internet connectivity?
I have UWB Ultra wideband integrated in my multiple iPhones using which I want to send/receive custom data (very low amount, possibly couple of integers with interval) between two iPhones without requiring any validation (connection establishment). The requirement is similar to broadcasting advertisement message of BT/WiFi. I wonder for UWB if it is possible or not. Any paper or article if feasible?
Post not yet marked as solved
I would like to hear from you.
Post not yet marked as solved
I am creating an IOS app using swift and was wondering if the Nearby Interaction framework (https://developer.apple.com/documentation/nearbyinteraction) could be used to locate and transfer files from one iPhone to another.
Post not yet marked as solved
Hello, i want to know if an Iphone 11 with its U1 Chip for example is able to get angle information of another Iphone and in how many dimensions. I reckon more than 2D is not possible.
An Iphone in combination with the Airtag seems to be able to get angular information but the antenna array might be provided in the tag rather than the Iphone.
Thanks for your help!
Post not yet marked as solved
HELLO 😊
I want to range two iphones 11 to single of DWM3000EVB device at the same time (simultaneous ranging /measuring distance )via UWB nearby interaction framework
will i be able to do it ? how to do it ? please let me know the code example on the side of iphone11 (swift code ) and the code on the side of DWM3000EVB
how many maximum of iphones 11 are able to range / interact to one of DWM3000EVB simultaneously with UWB ranging in order to get distance ?
the series or model of u1-equipped iphone is the factor of amount of iphones when UWB ranging ? for example iphone11 range to one DWM3000EVB or iphone 12 range to one DWM3000EVB or iphone 13 range to one DWM3000EVB or iphone 11 /12 /13 , 3 different series 's iphones range to one DWM3000EVB in the same event simultaneously , please let me know
Thank you very much! please see the picture below
Post not yet marked as solved
When I checked the NearbyInteraction Accessory Protocol Specification, the sequence diagram in Section 2.4 stated (1) Establish a data link (ieBLE, LAN, Cloud, or other).
However, in the sample code, there is no communication method setting for establishing the data link.
Since it is described in the specification, it means that there is an arbitrary establishment method but the implementation method has not been released yet, or it is necessary to contact Apple at the time of product development and request disclosure of the specification.
Please tell me who knows.
Post not yet marked as solved
Now'sample can connected with one Third-Party Accessory to receive periodic measurements of its distance,I want to connect four accessories(not iPhone) to receive their distance and direction at the same time ,How to do that. please tell me if you know how to do that,thank you very much!
Post not yet marked as solved
After upgrade to macOS Monterey and Xcode 13.1 my C++ projects are failing to compile. There are a lot of errors for not defined entities in various headers and a lot of linker errors for header files not found. This situation appeared after the upgrade with absolutely no changes in the codebase of my projects. Before the upgrade everything was fine and now I have more than 20 errors in one of my projects! I'm using VS Code as an IDE. Please give me advice, how to fix this issue?