View on GitHub

Internal Configuration Panel for iOS apps

iOS, iPad, iPhone, internal settings, internal config, utility

Download this project as a .zip file Download this project as a tar.gz file

Internal Configuration Panel for iOS apps

Motivation

During my internship at Pinterest, we face a problem of planting too many switches in the codebase at too many difference places to turn on/off features for testing/experiment purposes.

So I wonder, what if we have a way to centralize these switches and add more abilities, such as switching app languages?

In addition, the way to add these switches should not be any more difficult than putting a #define block in the codebase.

So this is where this utility comes in, to add a new switch, all you need to do is:

  1. Declare it through #define, the string associated with it will be the actual title to be displayed in the internal config panel.

  2. Declare its default value (YES or NO) and place it in a array, to indicate where to show on the panel and its default value

  3. Use this defined switch though [YFInternalConfig boolForKey:keyName] and you are done!

This utility will take care the rest: display it on panel, store it on user defaults and more.