wire-ios
wire-ios copied to clipboard
refactor: improve architecture - WPB-11396
|
|
Issue
This PR improves the architecture or our analytics setup so that we will be able to enable analytics during the login flow and track backup restore events. It also contains some various bug fixes and small refactoring.
Changes:
AnalyticsManager,AnalyticsSessionare replaced withAnalyticsService.AnalyticsServiceencapsulates the configuration, enabling, disabling, user management and tracking of events.CountlyProtocolabstractsCountly.- Use cases for enabling and disabling tracking have been simplified.
AnalyticsEventhas become a struct, predefined events are now created by static helpers.- File organization
- Bug fix: default segmentation (device type, os, etc) were not being tracked.
Testing
- Updated unit tests for use cases
- Unit tests for
AnalyticsService
Checklist
- [x] Title contains a reference JIRA issue number like
[WPB-XXX]. - [x] Description is filled and free of optional paragraphs.
- [x] Adds/updates automated tests.
UI accessibility checklist
If your PR includes UI changes, please utilize this checklist:
- [ ] Make sure you use the API for UI elements that support large fonts.
- [ ] All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
- [ ] New UI elements have Accessibility strings for VoiceOver.