Password autofill credential provider extension

Hi All -

I'm working on a password autofill credential provider extension for an iOS app and experiencing some weirdnesses that I'm trying to figure out if it's my specific code or the fact that I'm using things like SwiftUI and Tasks. Instead of asking a lot of deep technical questions I figured I would start with some basic high level questions to figure out if I'm even in the ballpark:

  1. Is it ok to use SwiftUI in a password autofill credential provider extension? I know that I can use/embed a SwiftUI view in the ASCredentialProviderViewController but is there something wrong with doing that? Things like Widgets clearly heavely leverage SwiftUI but it's not so clear with password autofill credential provider extension.
  2. Is it ok to use concurrency in an extensions? For example when func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity) is called I'd like to start a Task to leverage some of our existing async/await functions. Given that extensionContext.completeRequest or extensionContext.cancelRequest can be called when the work is done it would seem that leveraging a Task should not be a problem but it's not clear from the documentation if extensions or the specific functions are concurrency friendly.

I understand that we can do these things, ie the code works, but I'm more interested in a should we do these things or is doing these things potentially leading to my issues. Any suggestions, references, or general ideas are extremely welcomed.

Thanks in advance - AYAL

1. Is it ok to use SwiftUI in a password autofill credential provider extension?

I would expect so, but UI frameworks, and Authentication Services for that matter, aren’t really my field.

2. Is it ok to use concurrency in an extensions?

Yes.

Share and Enjoy

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

Password autofill credential provider extension
 
 
Q