Facebook has today open-sourced its rapid prototyping tool ‘Tweaks’, a framework that helps application developers quickly iterate on their projects and test out different possibilities for their iOS apps.
Tweaks makes it really simple for developers to adjust parameters and properties in their application and then test them out in realtime. This is particularly useful for rapid user interface development, which often consists of merely tweaking parameters (like colors or durations) than any involved work. Normally, developers have to recompile application binaries in order to change animation curves, durations or other parameters. This is relatively slow and inefficient.
Occasionally, it’s perfect the first try. Sometimes, the idea doesn’t work at all. But often, it just needs a few minor adjustments. That last case is where Tweaks fits in. Tweaks makes those small adjustments easy: with no code changes and no computer, you can try out different options and decide which works best.
By integrating Tweak into the codebase, these properties are no longer hard-coded at compile time but become malleable changeable values. The framework exposes a settings UI which means developer can adjust the values visually and dynamically — this saves time as developers don’t have to push a whole new build just to check out a new animation curve.
Facebook says that it used Tweaks throughout the development of Paper for exactly these reasons. Whilst other developers could (and undoubtedly have done) rolled their own system for doing realtime testing in the past, Facebook’s open-source offering will now let anyone do this with minimal effort. This means developers can focus on creating the next great app rather than worrying about creating ancillary tools to assist the process. Tweak can be found on Github.