Automattic / Automattic-Tracks-iOS

Client library for tracking user events for later analysis
GNU General Public License v2.0
43 stars 12 forks source link

Add iOS device accessibility settings to device properties. #214

Closed selanthiraiyan closed 2 years ago

selanthiraiyan commented 2 years ago

Related to - https://github.com/woocommerce/woocommerce-ios/pull/7576

Changes

In order to understand the accessibility settings of our users, this PR adds the following properties to the deviceProperties dictionary of analytics events.

Known issue

As this PR adds two properties to the Transformable deviceInfo (a dictionary) property of the core data model, we will face errors when trying to load stores created using previous versions of the core data model.

This is handled here by deleting the old store and creating a new one using the latest core data model.

I hope that we have to use a ValueTransformer to deal with the Transformable deviceInfo property of the core data model. I am not sure whether this issue was ignored because,

Please correct me if I am wrong about this.

Testing instructions

Follow the testing instructions from https://github.com/woocommerce/woocommerce-ios/pull/7576

selanthiraiyan commented 2 years ago

If I understand the two properties correctly, do they correspond to the two controls in the settings below?

Oh, it looks like that. I didn't realise this before. 😄

I added the device_info_is_accessibility_category property with the help of UIContentSizeCategoryIsAccessibilityCategory method as it looked like an easy way to filter events.