pers
02/24/2024, 12:47 PMclass AuthenticationAdapter: AuthenticationPort {
func __signIn(parameterName: String) async throws -> Result2<Auth0User, shared.AuthenticationError> {
do {
let credentials = try await Auth0.webAuth()
.connection(parameterName)
.scope("openid profile email offline_access read:current_user update:current_user_metadata")
.audience("https://" + clientInfo.domain + "/api/v2/")
.start()
}
....
}
Is there any benefits of using SKIE like concurrency , and do we need to ask Task {}
the function call from kotlin @kevin.cianfarini @russhwolfkevin.cianfarini
02/24/2024, 12:53 PMpers
02/24/2024, 12:57 PMPamela Hill
02/25/2024, 12:49 PMPamela Hill
02/25/2024, 12:51 PMpers
02/25/2024, 12:53 PMPamela Hill
02/25/2024, 12:56 PMpers
02/25/2024, 12:56 PMPamela Hill
02/25/2024, 12:57 PMkpgalligan
02/26/2024, 3:57 PM1. overriding suspend fun in swift
2. call overridden function from kotlinThis is a @Tadeas Kriz question for sure. Suspend functions in SKIE are different than the default ones that the Kotlin compiler produces, and I don't know how overriding them in Swift would be handed in the SKIE context.
pers
02/26/2024, 7:22 PMTadeas Kriz
02/26/2024, 7:24 PMsuspend
functions from any Swift thread, so you no longer need @MainActor
for those call and can call Kotlin suspend
functions like any other Swift async
functions. I'm not sure what you mean by "main thread safety"?pers
02/26/2024, 7:53 PMTadeas Kriz
02/26/2024, 7:56 PM@MainActor
might not be what you want. It depends on the semantics of your Swift code. If you decide you don't need @MainActor
, you can either pass in the flag to the compiler, or use SKIE. SKIE also give you cancelation support when calling Kotlin suspend
from Swift.pers
02/26/2024, 7:58 PM