Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some questions regarding migration to 2.0 #171

Closed
kkostov opened this issue Jul 18, 2024 · 3 comments
Closed

Some questions regarding migration to 2.0 #171

kkostov opened this issue Jul 18, 2024 · 3 comments
Assignees

Comments

@kkostov
Copy link

kkostov commented Jul 18, 2024

Hi @Jeehut, I'm attempting to migrate the Flutter plugin to use the latest version of the Swift library, however I'm facing some difficulties finding all the needed functions. Could you help me sort this out?

  1. How to reset the session of an already initialized TelemetryDeck? In 1.x this would be TelemetryManager.generateNewSession()

  2. How to stop an initialized TelemetryDeck either to prevent further telemetry from being sent or so it can be restarted with a different configuration? 1.x this would be TelemetryManager.terminate()

  3. How to update the default user for an initialized TelemetryDeck? 1.x this would be TelemetryManager.updateDefaultUser()

I see that in most cases, the new type are aliases for the existing TelemetryManager and TelemetryManagerConfiguration. Can I assume the 1.x API is still available?

Thanks a lot!

@kkostov
Copy link
Author

kkostov commented Jul 18, 2024

For example, would this be OK for v2: adopting the new navigation methods from the TelemetryDeck object and leave all existing use of TelemetryManager? e.g. TelemetryDeck/FlutterSDK@29dfabf#diff-68907eae6c259722b5afaaada14fc671fa5fb59ac030d96ae3ac1a1c55abe96dR47

@Jeehut
Copy link
Contributor

Jeehut commented Jul 19, 2024

@kkostov I updated all the methods that were documented in the Setup documentation or the Swift SDK reference doc. It seems none of these functions are documented there, so I was not aware of them.

I think it should be very easy to write functions that call into them so the new TelemetryDeck API supports all of them, too. Let me actually make a release with all the ones you mentioned added to the TelemetryDeck domain name. I wonder how people are supposed to discover them though, do you have any insights on this @winsmith? Sounds like that "SDK reference" document needs some update? Or are these such edge cases that you think we don't need documentation?

@kkostov I'll let you know when the release is made. A good opportunity to also try out if the CocoaPods CI workflow works.

@Jeehut Jeehut closed this as completed in f698a04 Jul 19, 2024
@Jeehut
Copy link
Contributor

Jeehut commented Jul 19, 2024

Nice, the CocoaPods deploy worked. @kkostov Please try version 2.2.4, it should have all the missing functions in the TelemetryDeck domain now. Please note that I renamed updateDefaultUser to updateDefaultUserID for consistency with the customUserID parameter in the new signal method. I provided fix-its for everyone using the old methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants