Is it possible to switch the Adobe app ID used to send analytics on tvOS/iOS while the app is running? | Community
Skip to main content
January 30, 2023
Question

Is it possible to switch the Adobe app ID used to send analytics on tvOS/iOS while the app is running?

  • January 30, 2023
  • 1 reply
  • 881 views

For analytics we have three different Adobe app IDs: one for development, one for staging, and one for production. In the test version of our tvOS app we have added a way to switch between which app ID is being used. Whenever a tester switches the ID this code is called:

var extensions = [Media.self, Identity.self, Lifecycle.self, Analytics.self, Signal.self] MobileCore.registerExtensions(extensions, { MobileCore.configureWith(appId: adobeApplicationID) })

However after switching to a new app ID the analytics are still being sent to the previous environment, until the app is killed and restarted. 

Is there a way to make the switch so it is effective immediately, without having to restart the app?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arjun_bhadra
Adobe Employee
Adobe Employee
January 30, 2023

You could use programmatic config instead of new config AppId to update it immediately
https://developer.adobe.com/client-sdks/documentation/mobile-core/configuration/#programmatic-updates-to-configuration

Refer the configuration keys for Analytics to update the fields needed for your test: https://developer.adobe.com/client-sdks/documentation/adobe-analytics/#configuration-keys

Thing to note:
It will not update the configuration on tags which the AppId refers to. It will just update the config locally and be persisted on the device.