Devin Snipes asks:
1. When it comes to iOS programming, does it matter what type of machine you have? I’m using a 2010 MacBook Air, and everything feels fine, although I’ve heard from some developers that xcode feels sluggish on 4GB of ram and they must get every Mac that comes out.
2. When compiling and submitting an app for 3.1.3, is it best to test your apps on all devices (i.e first generation devices) or would my iPhone 4 and the simulator do the trick?
Thank you for taking the time to answer my questions. Although I could perform a simple Google search for these questions, I’d prefer to get the answer from a well-known, trusted iOS developer.
It’s early in the morning and I am extraordinarily grumpy. But since you asked nicely I’ll try to give you my opinion.
What hardware you use to develop on is mostly up to you and your personal tastes. I would draw the distinction between hobbyist and pro by looking at what percentage of income you derive from your development work. Theoretically you could build iOS apps with a text editor and command line compiler, a practice that Erica Sadun has shown us in her earlier books.
ONE
If you program iOS apps as a hobby then the cheaper you get the better. The minimum hardware requirement is still that you at least have an Intel processor. But since you want to enjoy your hobby it would recommend any hardware that can at least run Lion, which means that its a 64-bit capable CPU. The reason for Lion is that there you get the Mac app store and in this you can find Xcode 4.1 for free. I recommend this for a specific reason: delta updates. Apple has promised us these at WWDC and with that it should be far less painful in the future when a new SDK comes out.
So there’s not really a TECHNICAL reason to get the latest hardware for hobbyists, only that the newest gadgets are possibly enhancing people’s perceived enjoyment. And enjoyment is what a hobby is all about. And psychologists tell us that we are masters of finding seemingly rational reasons to justify our impulse purchases later.
Original: “Boy my old Mac felt sluggish with the new Xcode. I had to get a new one because I couldn’t work like this.”.
Translation: “Boy am I cool because my new Mac is so shiny and I am so hip to already have downloaded the latest cutting edge Xcode build.”
Since cost must be low most hobbyists are getting a MacBook that they can afford. MacMinis would work well too, but it’s harder to justify 2 Macs to your wife if you don’t have sufficient income to show for that.
Now for professional developers the story is somewhat different. I count you as a professional if you derive sufficient income from your programming to live off it. This should also let you have a budget for devices.
Since devices are your working tools their purchase is a business expense and you can deduct a certain depreciation from your annual income. Where I live the accounting lifetime of any device over 400 Euros is 3 years. Below that limit it is 1 year. That means I don’t pay VAT on my devices and it also means that I am taxed on slightly less annual income. This totals to an estimated 30% of the sticker price of the device that I am spending less as compared to a regular person. Let’s face it, at 30% off any Mac is a total bargain.
Then there’s also the working efficiency factor. If your hardware lets you churn out more code in less time and debugging is faster then you can get more done. Working faster means earning more money or actually being able to go home at a reasonable time.
The current trend I see amongst professionals is to go with a 27″ iMac to put in your office and supplement that with a 11″ MacBook Air for traveling. For all the new panels and editors in Xcode 4 you definitely want to have a large monitor, much larger than what you have with a 17″ MacBook. 27″ work very well for me. Some people are still sticking to the single-Mac approach, but even these would have a large monitor sitting in their office to connect to.
I myself belong to the 2 device crowd and I like that I have a working machine to go to during the day. And for anything away from the office I have my Air. I generally try to refresh my hardware every 2 years. If business is going really well and I have some budget left, then I might even go for annually. The great thing about Macs is that they tend to keep their value very well (as long as they are supported by the most recent OS). A PC is next to worthless after 3 years, that’s why tax law has these 3 year depreciation duration. But Macs of the same age are still totally usable and would still be worth something. So after the Mac is written off you can take it out of your company for free and then sell it privately for profit.
In the past I often lent some replaced hardware to a friend in need or passed it to family members. One can never have too many Macs. 😉
TWO
You have to have a physical device available for any OS version you plan to support. Xcode 4.1 on the app store no longer comes with a 3.x simulator. Therefore to support iOS 3.1.3 it is essential to have either a first generation iPhone or iPod Touch available. You probably have set the SDK in all your project to “Latest OS” as is recommended. So you will find that all your code builds well, but when it runs on device it crashes with unrecognized selectors. Not testing for these problems on a physical device is asking for trouble.
Supporting older versions of the OS is a very tedious process, with lots of tricks to disable new features when they are not available. Something that I don’t see any reasonable hobbyist developer do. This is something that’s more the pro domain. And pros do it not because they enjoy it, but because they are paid by their clients for it because they believe that they will get more downloads like this.
You might think that to support iOS 3 and 4 is only the difference of supporting backgrounding on 4. This is one technology that can be added softly. But what about blocks? Starting with iOS 4 blocks are becoming the de facto standard for completion handlers and such. And there is no 3-compatible way to use these. Same is true for Grand Central Dispatch which is truly awesome once you start using it. So sticking with 3.x keeps you from learning and growing. And probably decrease your enjoyment of your hobby.
So for hobbyists I recommend ditching support for a deprecated iOS version as soon as the majority of users have updated and this usually seems to be the case about 6 to 9 months after the official release. The only reason in my humble opinion why there are still some people holding out is that they had a “friend” jailbreak their iPhone and don’t know how to keep their device unjailbroken when updating. I won’t go into the reasons people have for that in this article, but suffice it to say that these are a minority.
Requiring 4.x makes your live easier when it comes to testing devices as well. Since 4.3.5 is the latest stable iOS version you can use your main iPhone for testing. Once you have taken this step your question becomes, where to experiment with iOS 5 on…. several attendees of WWDC 2011 where spotted in the nearby Apple store to purchase a “sacrificial iPod Touch” for this purpose. Daredevils like myself don’t use protection, they test it on their main device.
Again, the answer has to be different for professional developers who actually get paid to bear a certain amount of tedium. The same holds true here as for the Macs. Since you are bound to refresh frequently you will probably have a number of iPhones around to keep an older iOS on. I have had all iPhones: original, 3G, 3GS and 4. All still in working condition. Or if you don’t then you can easily get an older generation iPod Touch for that purpose.
That much for supporting and enhancing existing software. What about new apps? Just recently Scribd launched the Float Reader and there they decided to be requiring 4.0 and above. And still the app made top 10 in most markets in the News category. This is a perfect case study in how ditching support for an old iOS version as well as deferring iPad support sped up the time to market. Focus.
Long story short: one physical device per iOS version. Hobbyists should try to minimize the number of supported iOS versions. Pros are getting paid for the extra work of keeping backward compatibility.
Categories: Tools
One thing that developers should consider when upgrading their hardware is how their current hardware compares to any available upgrade. For example, I have an early 2008 MBP. Since I am a full-time developer, my most likely option for an upgrade would seem to be a new MBP, right? But if I am comparing benchmarks, even the 13″ Air gets a 78% higher geekbench score than my (once blazingly fast) MBP. Amazingly faster than what I currently have and considerably less expensive than a new MBP — seems like a win to me.