Okay, I found a way to use debug print in a Live Activity. You can need the Console.app on Mac OS and use the Logger struct in the os framework.
import os
let logger = Logger(OSLog(subsystem: "com.yourapp.identifier", category: "General"))
logger.info("Your message to print in Console.app"
I am answering my own comment above, but since Live Activity is its own contained process, there is no way to attach the XCode debugger to it. Nonetheless you can observe the logs from liveactivitiesd in the Console app on Mac, but that's not very useful.
Well, I guess, now that I understand better how the Live Activity works, there is no way to attach the debugger. Live Activity is a very basic component that requires minimal computing.
Wrapping tabBarController.selectedIndex = selectedIndex into UIView.performWithoutAnimation did the trick for me.
UIView.performWithoutAnimation {
tabBarController.selectedIndex = selectedSegmentIndex
}
Okay, I found a way to use debug print in a Live Activity. You can need the Console.app on Mac OS and use the Logger struct in the os framework.
import os
let logger = Logger(OSLog(subsystem: "com.yourapp.identifier", category: "General"))
logger.info("Your message to print in Console.app"
I am answering my own comment above, but since Live Activity is its own contained process, there is no way to attach the XCode debugger to it. Nonetheless you can observe the logs from liveactivitiesd in the Console app on Mac, but that's not very useful.
Well, I guess, now that I understand better how the Live Activity works, there is no way to attach the debugger. Live Activity is a very basic component that requires minimal computing.
Wrapping tabBarController.selectedIndex = selectedIndex into UIView.performWithoutAnimation did the trick for me.
UIView.performWithoutAnimation {
tabBarController.selectedIndex = selectedSegmentIndex
}