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.

Hi gorka-mk,

I might be able to help if I can get my 3rd party accessory up and running with background mode. I understand that is not the issue you describe here but maybe once I get it working can look into the direction nil issue as I also need this to work.

Can you provide any detail on how you got your 3rd party accessory working with Nearby Interaction Service (BLE GATT service) required to support background mode? I am currently working with Qorvo DWM3001CDKE development board. Stuck on BLE advertising both the UART and Nearby Interaction Service. I'd appreciate any direction on how you got this working.

Thanks, -Brian.

Direction is NIL using iOS 16 BETA NearbyInteraction framework
 
 
Q