hi again, do you know if there is any way to get n...
# multiplatform
j
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
Yep, write an interface and pass an implementation to kmp
j
Could you explain to me where the interface should be written on? (e.g. swift project, commonMain)
p
It depends. Do you have an android equivalent? Do you want to do sth only for iOS or also for droid?
j
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
applicationDidEnterTheBackground(application)