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])

  1. Is there a way to receive NINearbyObject in the background?

  2. If not, is there a way to get a sample code on how to measure the background distance?

  3. 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.}

Did you get any solution on this?

background TWR Session Respose in myapp
 
 
Q