Once https://phabricator.wikimedia.org/T374058 is merged, we need to update the iOS app to begin sending the new is_temp values in all of our MEP events.
- Update to the new schema version numbers here. Reference the iOS and Android patches for the new version numbers.
- Update EventPlatformClient to send is_temp for all events. We can follow how we do is_anon as a pattern:
- Create computed property isTemp. The logic here to match Android is that if any wiki auth state in WMFAuthenticationManager indicates that it is temporary, we return true in this computed property. This may mean we need to make a helper method in WMFAuthenticationManager (similar to this one) that checks the currentUserCache auth states, and returns true if any indicate temporary.
- Add isTemp to EventBody struct and coding keys, then encode it with the computed property result.
QA Notes
Can be tested starting in TestFlight 7.6.1 (4246). You can enable the toggle for sending to the testing analytics endpoint via Developer Settings menu (app Settings > About the app > About, tap 7 times). Then watch payloads that appear in the portal as you use the app:
- Fresh launch on app, ensure you are logged out. Watch the payloads as you click around and confirm you see is_anon = true and is_temp = false send in the events.
- Edit an article on Test Wiki. Confirm that after publishing, you start to see is_anon = true and is_temp = true. If an event goes through the EditAttemptStep funnel, you will see a payload with user_is_temp = true and is_anon = true.
- Continue clicking around and confirm you continue to see is_anon = true and is_temp = true logged.
- Log into the app. After login and clicking around, confirm you now see is_anon = false and is_temp = false.