At some point I want to put together some App Store numbers, but until then, here’s something unexpected I noticed today: 96% of all pirated copies of Converted are from China.
The iPhone is not officially on sale in China, which means that probably close to 100% of Chinese iPhones are jailbroken, and so it makes sense that piracy would be widespread. But still, 96% is a huge percentage.
I’m lazy – really lazy. So when I decided to create a free version of Converted, my first thought was: “How do I set this up so building the two versions and keeping them in sync requires no extra effort?”.
Since I’m no Xcode expert, it required some deliberation (and digging), but eventually I came up with a solution that fulfilled these requirements:
The solution hinges upon simply using 2 different Info.plist files. Apart from some Apple-specified keys that have to be set in each file, I also added (amongst others) a key for a boolean that controls the version (eg. XXIsLite). Within the code, the different functionality between the 2 versions is controlled by observing that boolean value.
Now normally, this solution is A Very Bad Idea™: a sneaky user of the trial version could just open up the bundle, change the key and gain access to the full version. On the iPhone however the bundles are signed, so this isn’t possible (I’m obviously discounting jailbroken iPhones that bypass the codesigning – anyone who goes to that much trouble to save a couple bucks is beyond help).
So here’s the process I followed, more or less:
When you’re done, all you have to do to build either version is simply set the active target and build. This way, you can release updates for both the full and trial version with no extra effort at all!
Tip: when directing to the App Store, replace ‘itunes’ in the link with ‘phobos’; this will send the user directly to the App Store, without first launching Mobile Safari. For example,
http://itunes.apple.com/WebObjects/MZStore.woa/...
will first launch Mobile Safari and then redirect to the App Store, while
http://phobos.apple.com/WebObjects/MZStore.woa/...
will open the App Store immediately.
This was definitely a pleasant surprise: after only 5 days in review, I got the email saying that Converted has changed status to “Ready for Sale”. I was expecting it to take at least a couple of weeks, especially since the enrollment process was so frustratingly long.
As happy as I am, however, I do feel sorry for the person(s) at Apple working on a Sunday…