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

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 の返信
  • 882 ビュー

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?

このトピックへの返信は締め切られました。

1 の返信

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.