Comment by simias
13 years ago
I don't understand, what does this function do? Is it a reference to something? Or just a simple easter egg?
13 years ago
I don't understand, what does this function do? Is it a reference to something? Or just a simple easter egg?
Apple ships iOS beta builds before announcing new hardware. They obviously don't want to leak information about new functionality like HDR support too early. So they use a special string "YoMamaWears..." meaning of which is known only to people in the appropriate team. Then, when iPhone 5s is finally released, they easily find-and-replace the obfuscated methods with proper identifiers.
It does look like an HDR placeholder, or one hell of a coincidence.
From `AVCaptureFigVideoDevice.h`
It's funny because "Fig" was supposed to be replaced by CM or CoreMedia at some point but it was so integrated into the code that it never happened. So here we have a rare case of double export obsfucation.
They’re masking new features with ”creative” variable/method names.
Oooh, I see. Thanks.
It's a feature flag, but it's one that user's don't have easy access to. Pretty much every big software company does this, because it's a very effective way of testing new code. I know MS, Amazon, and Google all have tooling designed to facilitate just this sort of thing.
Let's say you've rewritten core parts of some system, but you've also added new features that didn't exist before. Often times such changes are inextricably bound together. On the one hand you may want some users to test out the new code to make sure it works correctly, but on the other hand the new features you've added may not be fully "baked" so you want to restrict their use. That's where secret feature flags come in.