AKAuthenticationError Code=-7089 when trying to setup sharing web credentials on macOS

I’m trying to implement web credentials sharing on macOS 11.0.
According to documentation:

1) added associated domain file to website and now it’s available at location https://my.website/.well-known/apple-app-site-association (my.website is just and example here)

2) added Associated Domains entitlement to my macOS app with value webcredentials:my.website

Problems:
  • when using SecAddSharedWebCredential func get callback error: 

Code Block
Error Domain=NSOSStatusErrorDomain Code=-4 "SecAddSharedWebCredentialSync not supported on this platform" (kCFMessagePortTransportError / kCSIdentityDeletedErr / unimpErr:  /  / unimplemented core routine) UserInfo={numberOfErrorsDeep=0, NSDescription=SecAddSharedWebCredentialSync not supported on this platform})
  • when using SecRequestSharedWebCredential func get console error and callback error (the same for ASAuthorizationController with ASAuthorizationPasswordRequest request)

Code Block
Authorization failed: Error Domain=AKAuthenticationError Code=-7089
Code Block
Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1000

What I’m doing wrong? 

I looked into this and it looks like:

Error Domain=NSOSStatusErrorDomain Code=-4 "SecAddSharedWebCredentialSync not supported on this platform" (kCFMessagePortTransportError / kCSIdentityDeletedErr / unimpErr: / / unimplemented core routine) UserInfo={numberOfErrorsDeep=0, NSDescription=SecAddSharedWebCredentialSync not supported on this platform})

Is a known issue due to the SecAddSharedWebCredential API not being completely available on macOS. My recommendation here would be to open a bug report and respond back with the Feedback ID.


Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com
FB8968016
currently resolved as "works as designed", but then it seems that the documentation should not mention macOS.

Did you manage to resolve this issue? I'm having same problem on Big Sur. Documentation seem to be wrong because it states that this API should work on Big Sur: https://developer.apple.com/documentation/security/1617986-secaddsharedwebcredential?language=objc

After checking source code of "Security" project it looks like it is not fully implemented: https://opensource.apple.com/source/Security/Security-59754.80.3/OSX/sec/Security/SecSharedCredential.c.auto.html

// OSX now has SWC enabled, but cannot link SharedWebCredentials framework: rdar://59958701

How can we track this rdar?

How can we track this rdar?

Your best option is to file your own bug and ask it to make marked as a duplicate of that bug. This gives you very limited info about the state of the original (only its open/closed status, IIRC).

Share and Enjoy

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

It's still documented as available in macOS 12. How it can be "works as designed" and not supported at the same time?

Reported as FB9728793

AKAuthenticationError Code=-7089 when trying to setup sharing web credentials on macOS
 
 
Q