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.