mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.08k stars 2.88k forks source link

Investigate Options for Experiment Where App Icon Background Colors Are Different #20251

Open data-sync-user opened 1 month ago

data-sync-user commented 1 month ago

Hypothesis: A white app logo background makes the FXIOS app easier for users to find on their home screens rather than a dark purple app logo background.

Problem:

We would like to understand the best way to create and deliver an experiment where the TEST group gets a white logo background and the CONTROL group gets the dark purple (as-is).

Metrics we would like to track a number of sessions opened per month, and retention for both groups.

Ideally, the TEST and CONTROL groups are a subset of the total population and both can be randomized from the total population so we can achieve statistical significance.

┆Issue is synchronized with this Jira Spike

data-sync-user commented 1 month ago

➤ Roux Buciu commented:

Jeremy Evans re: iOS leads covresnaiton

data-sync-user commented 1 month ago

➤ Matt Reagan commented:

I did a quick dev spike on this, findings are summarized below. TL;DR: this should be a relatively low LOE to implement. However, one issue I wanted to call out is that iOS shows an alert to the user whenever we programmatically change the app icon.

Potential Issues

Implementation Summary

  1. Icons must be declared in the Info.plist of the client, for the CFBundleIcons key (example entry below)
  2. Icon image file must be added to the project "loose" (not in the asset catalogue)
  3. We check supportsAlternateIcons on UIApplication, and if it returns true (which it should if we have configured it correctly) then we call setAlternateIconName to change the icon
  4. We can revert the icon to the default app icon by passing nil as the argument for the above function

Feature Flag

Metrics / Telemetry

Other Notes

Example Info.plist entry (where the alternative icon is named AppIconAlt in this case):

CFBundleIcons CFBundlePrimaryIcon CFBundleIconFiles AppIcon UIPrerenderedIcon CFBundleAlternateIcons AppIconAlt CFBundleIconFiles AppIconAlt UIPrerenderedIcon cc gangadi Orla Mitchell Norberto Andres Furlan Jeremy Evans !Screenshot 2024-05-24 at 2.04.53 PM.png|width=338,height=183,alt="Screenshot 2024-05-24 at 2.04.53 PM.png"!