Communication between live activities and main app

How to execute code on main app when interacted with a live activity, given that they are already interactable.

is there a way without opening the app?

what are the best ways?

Answered by Engineer in 823121022

You can use an App Intent to perform action that uses your app's functionality but direct communication is not supported. You will need to either

  1. Ise App Groups to share a file location
  2. Use a SwiftUI button that takes an App Intent as a parameter to call shared code or launch your app and perform a task in response to touch.

Rico


WWDR | DTS | Software Engineer

You can use an App Intent to perform action that uses your app's functionality but direct communication is not supported. You will need to either

  1. Ise App Groups to share a file location
  2. Use a SwiftUI button that takes an App Intent as a parameter to call shared code or launch your app and perform a task in response to touch.

Rico


WWDR | DTS | Software Engineer

Communication between live activities and main app
 
 
Q