0

Straight to the point: Is it possible to initiate a mixpanel instance, and send a track request from an app extension (i.e Notification Service Extension when received push notification) IF the app is in state:

  1. Terminated (swiped away in app switcher or never opened)
  2. Running in background (pressed home button)

Or does atleast the function didReceive in the extension gets executed? I can tell that the extension is running because the push notification is always received. I hope I can finally get a good, verified answer. Thanks in advance

I tried sending event in those 2 state, and I'm sure that im doing it right since it is working perfectly when the app is opened and running. For the state running in background Im pretty sure the answer is yes but I need to make sure

  • The extension is its own process so you need to ensure you initialise a mix panel api instance in the extension. You cannot rely on the main app instance – Paulw11 May 26 '23 at 08:52
  • so even when app terminated, i can still run the tracking if i initialize and call track inside the extension? – Rhendy rivaldo May 26 '23 at 09:53
  • Yes, the extension is a separate process to your app – Paulw11 May 26 '23 at 10:10

0 Answers0