deviceOwnerAuthenticationWithCompanion evaluation not working as expected

In one of my apps I would like to find out if users have their device set up to authenticate with their Apple Watch. According to the documentation (https://developer.apple.com/documentation/localauthentication/lapolicy/deviceownerauthenticationwithcompanion) this would be done by evaluating the LAPolicy like this:

var error: NSError?
var canEvaluateCompanion = false
        if #available(iOS 18.0, *) {
            canEvaluateCompanion = context.canEvaluatePolicy(.deviceOwnerAuthenticationWithCompanion, error: &error)
        }

But when I run this on my iPhone 16 Pro (iOS 18.5) with a paired Apple Watch SE 2nd Gen (watchOS 11.5) it always returns false and the error is -1000 "No companion device available". But authentication with my watch is definitely enabled, because I regularly unlock my phone with the watch. Other evaluations of using biometrics just works as expected. Anything that I am missing?

Answered by DTS Engineer in 851330022

The behaviour you’re seeing is expected. When you consider an iPhone with a paired Apple Watch, there’s a disparity between unlock and authentication. While the watch can unlock the phone, it can’t act as an authentication companion.

I had to double check this with the team (-: because we have been expanding the set of allowed authentication companions in recent releases.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Accepted Answer

The behaviour you’re seeing is expected. When you consider an iPhone with a paired Apple Watch, there’s a disparity between unlock and authentication. While the watch can unlock the phone, it can’t act as an authentication companion.

I had to double check this with the team (-: because we have been expanding the set of allowed authentication companions in recent releases.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Thanks for your response! If iPhone with paired Apple Watch doesn't return true when running canEvaluatePolicy(.deviceOwnerAuthenticationWithCompanion, error: &error), in which case would this return true?

(tried to post this as comment to your answer, but always got an error doing so)

deviceOwnerAuthenticationWithCompanion evaluation not working as expected
 
 
Q