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:
- 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
ASCredentialProviderViewControllerbut 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. - Is it ok to use concurrency in an extensions? For example when
func provideCredentialWithoutUserInteraction(for credentialIdentity: ASPasswordCredentialIdentity)is called I'd like to start aTaskto leverage some of our existingasync/awaitfunctions. Given thatextensionContext.completeRequestorextensionContext.cancelRequestcan be called when the work is done it would seem that leveraging aTaskshould 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