February 28, 2011
I have been a Microsoft developer for many years and was recently assigned the task of building an application for the iPad. I jumped at the opportunity and got to work learning all I could about building native iOS applications. I’m about one month into the project and feel like I’ve got a few tips and conceptual nuggets to pass along that might help other .NET developers get started building iOS applications. I hope to show that many of the possibly unfamiliar tools and terms in the Apple development world have counterparts in the Microsoft world. It has been my experience that making some of those connections early in the learning process reduces the frustration I feel when trying to quickly become productive with unfamiliar tools. Once I made some of those connections, I realized I wasn’t coding on another planet after all – just in a different neighborhood.
The Very Basics
The first step to building native apps is to get your hands on a Mac – preferably a late-model iMac or MacBook Pro capable of running the latest flavor of OS X (currently 10.6 – Snow Leopard). You will then need to download XCode which is Apple’s IDE. It may seem trivially simple, but that brings me to the first connection I would like to make between the Apple and Microsoft development worlds: XCode == Visual Studio. I, of course, don’t mean this literally. The two products are different in more ways than I could ever detail here. It should be assumed that my equality references are meant to illustrate conceptual equality for the purpose of connecting ideas or tools from one environment to the corresponding idea or tool in the other.
You can download XCode from the Apple Developer Center website (http://developer.apple.com) which is Apple’s version of Microsoft’s MSDN website (http://msdn.microsoft.com). The XCode installer will include the most recent version of the iOS SDK. This is similar to the way Visual Studio includes the most recent version of the .NET Framework. However, it should be noted that both products allow you to target an earlier version of the SDK/Framework for a given build.
The final bit of information I want to include in this introductory post is a quick mention of the programming language used to build native apps. In Visual Studio, you can build applications with C#, VB.NET, or even F# (if you’re feeling fancy). In the Apple world, the programming language is Objective-C. It is an object-oriented language that, like C#, is based on the C programming language. Even if you are familiar with C#, the Objective-C syntax will probably look quite foreign at first. However, it is just another object-oriented language – it has properties, member variables, methods, etc. just like C# and VB.NET. I’ll cover some specifics about translating your knowledge of .NET languages to Objective-C in future posts.
Here is the quick-reference version of how the technologies relate to each other:
|OS X operating system||Windows operating system|
|Apple Developer Center||MSDN|
|iOS SDK||.NET Framework|
|Objective-C||C#, VB.NET, F#|
I realize the details I have presented in this post are very basic, but I want to make sure I start at the very beginning in case there are .NET developers reading this that have never been exposed to Apple devices but would like to become more familiar with them and start writing some code using their tools. More in-depth posts are coming, so stay tuned.