exponea / exponea-ios-sdk

MIT License
19 stars 27 forks source link

Enabling/disabling `automaticSessionTracking` on the fly after 2.9.0 #25

Closed sgrgrsn closed 1 year ago

sgrgrsn commented 3 years ago

From the 2.9.0 release notes:

BREAKING CHANGE: The SDK can only be configured once. Reconfiguration of the SDK caused some of the handlers to be registered multiple times which then resulted in automatic events to be tracked multiple times. You should be able to change most of the setting on the fly. To change project tokens, you can use anonymize() method (see ANONYMIZE.md)

We are enabling and disabling the automaticSessionTracking on the fly (eg. when the user change tracking settings or signs out). As we can no longer call the Exponea.shared.configure(...) more than once we need another way of changing this setting. I can't seem to find that anywhere in the documentation and that's why I'm writing here.

Could you please help us out?

Thanks.

BTW. What are your thoughts about introducing breaking changes in minor releases? I think it would be appropriate to bump the major version number when introducing breaking changes like this so it's very clear.

michaela-dev commented 3 years ago

Hi, thanks for your message, and sorry for the late reply. Unfortunately, setting automaticSessionTracking on the fly is not possible for now. We will consider adding this in the next release.

sgrgrsn commented 3 years ago

Do you have any suggestions on how to be compliant and let the user choose when to start and stop tracking when this can't be changed on the fly? I'm afraid crashing the app to force a restart is not an option 😃

MatejBordac commented 2 years ago

Hello, we have very similar use case but changing the configuration value for pushNotificationTracking, so I'm also hoping this issue will find it's way to next releases 😃

sgrgrsn commented 2 years ago

Any news here @michaela-dev? It's a bummer to be stuck on the version where starting and stopping is available.

sgrgrsn commented 2 years ago

Any news, @michaela-dev?

michaela-dev commented 2 years ago

Hi, we will try to address this on next release, it's planned to be ready by the end of January.

sgrgrsn commented 2 years ago

@michaela-dev Any news on the release for the end of January?

michaela-dev commented 2 years ago

Hi, we released a new version in January but were not able to include this. Changing automaticSessionTracking on the fly will be available in the next release scheduled at the end of February.

sgrgrsn commented 2 years ago

@michaela-dev Thanks for the update. Could you post a comment here when it has been released?

sgrgrsn commented 2 years ago

@michaela-dev Any news on the release for the end of February?

michaela-dev commented 2 years ago

Hi, I am doing my best to release it by the end of this week. Will keep you posted. Thanks.

michaela-dev commented 2 years ago

@sgrgrsn Hi, I just released version 2.11.3, this version contains method setAutomaticSessionTracking which you can use to set automaticSessionTracking on the fly. We added this method for you, and we made it deprecated because the whole "changing config on the fly" will be subject to bigger changes in the future.

sgrgrsn commented 2 years ago

Thanks! I will have a look.

loki187 commented 1 year ago

Hi @michaela-dev. I am using the latest version of exponea sdk. I need to change a configuration for pushNotificationTracking and automaticSessionTracking on the fly (when user click on the switch button, then enable or disable it). Is there any possibility to do that ? I don't want to use deprecated setAutomaticSessionTracking. In the documentation I didn't find any description how to do that. I get an error when I try to call Exponea.shared.configure for a second time. @sgrgrsn are you still using this deprecated method, or did you solve it somehow?

sgrgrsn commented 1 year ago

@loki187 Yes, we are still using the deprecated method.

I assume @michaela-dev will let us know when their "bigger changes" have been applied and there is a non-deprecated way of doing this.

adam1929 commented 1 year ago

Hi there. SDK does not support a re-configuration in runtime. Method setAutomaticSessionTracking is exception, that has been provided by Michaela earlier. Please use it if you need. Method is marked as deprecated but can be used. There is no active plan to support runtime re-configuration yet. Please ask support channel and give a vote for that.