Closed idelfonsog2 closed 2 years ago
Yes, the public API of the MSLA library is Objective-C based. Objective-C methods with completion blocks are automatically translated into async methods in Swift. For example:
func abc() async throws
{
let a = MSALPublicClientApplication()
let acc: MSALAccount? = nil
let p = MSALSignoutParameters()
try await a.signout(with: acc!, signoutParameters: p)
let sp: MSALSilentTokenParameters? = nil
try await a.acquireTokenSilent(with: sp!)
let ip: MSALInteractiveTokenParameters? = nil
try await a.acquireToken(with: ip!)
}
I get the following docs
It seems it comes from the Objective-C Interface, although other methods are not using this "magic" is it supported in all methods or not? is there a specific branch that I should use the library from? or any information related to it?