New to Mobile Development and iOS Technology ?
Tizen and Ubuntu are going to make their entry as mobile operating systems soon – maybe as soon as the end of this year. Android already is the numero uno mobile OS in terms of adoption and Windows 8 mobile is hot on its heels. Apple’s iOS looks like it has plenty to worry about when it comes to handling competition. Known for its innovation until a couple of years ago, Apple is staring blankly at a bleak future. Unless they come up with something groundbreaking and earth-shattering, they might just slide into quiet oblivion soon, probably patronized by a few die-hard fans from the early days. Nevertheless, iOS remains a formidable mobile OS even today. It is still supposed to be the most secure and suitable for enterprise mobility. I’ve had a fair amount of experience developing apps for iOS devices. I’d like to share a few thoughts with those that are new to mobile technology – specifically the iOS. I’m sure you can get a quick understanding by reading this article.
Fundamentally, there are two kinds of apps one can develop for mobile devices – Native and Mobile Web Apps. Let us focus on Native Apps in this article.
Native Apps are mobile applications which use the API provided by the OS of the native device and are installable on mobile device. Native apps can run offline without a network connection. Of course, this does not mean they do not make calls to a server application but essentially the rendering is done using the native API provided by the OS of the mobile device. Native apps are generally considered to be more responsive, richer in user interface and are supposed to provide overall greater user experience than the mobile web apps.
Like I’m sure you know, there are different mobile devices from different manufacturers (Samsung, Apple, HTC, Nokia, Sony, etc) and then again there are different mobile operating systems (Google Android, Apple iOS, Microsoft Windows 8 Mobile, RIM Blackberry, Ubuntu, Tizen, Symbian, etc) that these devices run on. Based on the device and the OS it runs, we must use different mobile technologies to build native apps to run on these mobile devices.
iOS is one such technology. It is from Apple inc. and is the OS that runs on all of Apple’s mobile devices like iPods, iPads and iPhones. The operating system manages the device hardware and provides technologies required to develop native apps for those devices. Before we start developing apps for iPhone, iPod or iPad we should set up a development environment. To setup the development environment we need Macintosh machine running on the latest Mac operating system (Lion OS), iOS Software Development kit and one of the iOS devices for testing.
iOS Software Development Kit contains the tools to develop, install, run and test native apps for iOS devices. The current version of iOS is 6.x. We need to learn Objective-C, the language in which we write iOS apps and have knowledge of Object Oriented programming concepts to understand iOS API and development paradigm. We can download iOS SDK from developer.apple.com website. We must register in with apple website to access the SDK either as part of the Online Developer program, which is free, or iOS Developer program with a fee of about $99 per year or finally, the iOS Developer Enterprise program with a fee of $299 per year (this is if you are an enterprise mobile development initiative).
The SDK installs complete suites of interactive design tools on your machine. From the point of view of a native application developer the important components from the suite are XCode, Interface Builder, Simulator, Instruments and Shark. I will explain each of them in brief below.
XCode: Xcode is the most important tool in iOS development. It is an Integrated Development Environment. It provides development and management environment like source editing, building and debugging of the application, testing the application on simulator and packaging the application to deploy on iOS devices. The latest version of XCode is 4.6.
Interface Builder: Interface Builder (IB) provides a tool to design UI of iOS apps. With IB, we lay out our interface using visual design tools and then connect those onscreen elements to objects and method calls in our application. With XCode 4, IB has been integrated into the primary XCode IDE rather than working as a standalone application, as it had throughout earlier versions of the SDK.
Simulator: iOS simulator runs on a Mac machine. We can test applications on desktops without connecting actual devices. The simulator offers the same API used on iOS devices and provides preview of how our application UI will look on a device. The important point is that we can only test limited functionality on a simulator. This cannot be treated as the final testing of an application.
Instruments: Instrument profiles how native applications work under the hood. Instruments offer graphical time based performance that shows where our applications are using most resources and where memory leaks are happening in our applications. It plays a major role in making sure our applications run efficiently.
Shark: Shark provides performance tuning by analyzing where an application spends most of its time. It locates and identifies bottlenecks, enabling us to speed our application performance. As of XCode 4, Shark’s performance analysis has been rolled into Instruments.
Along with the above tools another important element of the iOS SDK is Cocoa Touch. Cocoa Touch is the library of classes provided by Apple for iOS application development. It takes form of number of API frameworks. We build graphical event driven applications using interface elements provided by this library.
After successful development of our application using above tools we should deploy that application on a physical device. To do this we login to apple website with paid developer credentials and then follow the steps to create and download mobile provisioning certificate into our machine. We set this provision certification in XCode configurations and generate app file to deploy on device or generate an ipa file to distribute through the Apple App Store.
So that was a super brief introduction to iOS development. I hope it has given you enough ammo to want to invest more time to get to know this wonderful technology at closer quarters.