hi again, do you know if there is any way to get notified of Swift AppDelegate’s lifecycle methods (e.g. applicationDidEnterBackground) in Kotlin multiplatform?
p
Paul Woitaschek
05/26/2022, 11:04 AM
Yep, write an interface and pass an implementation to kmp
j
Jose Garcia
05/30/2022, 3:57 PM
Could you explain to me where the interface should be written on? (e.g. swift project, commonMain)
p
Paul Woitaschek
05/30/2022, 3:59 PM
It depends. Do you have an android equivalent? Do you want to do sth only for iOS or also for droid?
j
Jose Garcia
05/30/2022, 4:01 PM
Only for iOS, because I am using the background task APIs, and Android uses WorkManager, which APIs doesn’t seem to care about going in the background.
However, in iOS, creating a background task requires the task to be created in the AppDelegate method