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?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
Release notes of Xcode 26.2 https://developer.apple.com/documentation/xcode-release-notes/xcode-26_2-release-notes state that Swift 6.2.3 is shipped with it.
But when trying to check the Swift version with
#if swift(>= 6.2.3)
it returns false.
Running swiftc -version returns
swift-driver version: 1.127.14.1 Apple Swift version 6.2 (swiftlang-6.2.3.3.2 clang-1700.6.3.2)
As you can see, there is a mismatch between the marketing version "6.2" and the build version "6.2.3.3.2".
Being able to check for the 6.2.3 version is important for my team, because we are impatiently awaiting the change to the tabviewbottomaccessory modifier
https://developer.apple.com/documentation/swiftui/view/tabviewbottomaccessory%28isenabled:content:%29
so that it can be hidden when not needed. Without this fix we have the issue that the accessory shows even without content in iOS 26.1.