Aug 2, 2011

Getting started with iOS development

So... In the last couple of weeks, I've been researching iOS development - reading some blogs, going to some lectures or watching them on iTunes U, searching for answers to common questions on stackoverflow, etc.
This doesn't make me an expert on the subject, but I think if like me - you're thinking about starting with iOS development or mobile development in general, this post might save you some time and make sure you're not missing any of the important technologies available today (August 2011), and the information you need to know in order to get started.

Before You Start...

Do I have to own a Mac in order to develop for iOS?


  • In a word: YES.
  • There might be frameworks that will let you develop the applications without a Mac, but when you'll want to deploy on a real device, or to the app-store, you're going to need a Mac for that.
  • Even if you succeeded in creating a Hackintosh on a VM (I personally had a really hard time trying to do so...), it is not recommended - as you are going to have troubles once you'll need to update your software/OS version, etc.
  • I tried to find online solutions for "Mac for rent", and found macincloud.com, but 2 days after sending a request for a trial they announced they closed the site for new users.



Does it cost me money to develop iOS applications?


  • The iOS Developer Program costs 99$/year. It lets you have the development environment for free, and the ability to install your apps on up to 100 personal device, and deploying them to the App Store.
  • You can however, obtain xCode (the development environment) for 5$ in the Mac App Store, or get the 4.1 version comes free if you have OS X Lion. This will let you develop apps freely, and test them on the iPhone/iPad simulators. If you'd like to test them on a real device as well without paying the 99$, you'll have to jailbreak it first (which is a big No No if you're planning on deploying it to the App Store in the future).
I'm considering deploying my app to android or other platforms as well.
What kind of options do I have?



  • Well, it seems as if the most popular choice is simply to re-write your app for the other platforms using the platform's native framework + SDK. This might sound surprising, but understandable once you think about the downsides of the cross-platform solutions available today.
  • Notice that because both Java (Android) and Objective-C (iOS) can integrate with C/C++ code, writing at least some layers of your application in C/C++ will make it easier to port it to other platforms.
  • This is also true about web applications. Nowadays, all smartphones and tablets have the capability of displaying web content such as HTML5/CSS3/Javascript. Therefore, writing your app as a web application or at least having a web container that runs web content as part of your native app, will make it available for other platforms freely, or at a very low cost. There are also some frameworks that will facilitate your efforts writing such apps, that will be discussed later on this post.
  • Even though there are some downsides, there is a variety of available frameworks for developing cross-platform apps, and I'm going to discuss all the notable ones later on this post.
So, what are the downsides of using a cross-platform solution?
  • Native Features: Most of the available cross-platform solutions won't let you access all the native features of the hardware. For instance, if you want to record real-time data from your microphone or camera, you'll have to write native code that does it, even if your basic framework is cross-platform.
  • Performance: Like cross-platform solutions on the PC, a cross-platform solution in mobile devices comes with a performance overhead, some more than others.
  • User Experience: Your UI will fail to address the special look-and-feel and the specific features of a given platform, like the 4 physical buttons that exist in Android vs. the single home button in iPhone, which will surely feel awkward to the user.
Why iOS and not Android?


  • While following smule, a great music-related iOS app developers, I found an interesting post they shared about why they don't develop applications to Android:
    http://tech.fortune.cnn.com/2011/05/27/why-its-harder-to-make-money-on-android-than-on-apples-ios/
  • Another thing they claimed, is that it's impossible to do real-time audio processing in Android due to high latency: "right now if you create an app for android that just routes the audio from the microphone to the speaker, there will be a noticeable delay, even on the devices with fast processors. This is a problem because if you want to make an app like 'I Am T-Pain' then it becomes impossible from a user experience standpoint to do live vocal processing. Put another way, hearing your voice come out of the speaker delayed creates a user experience that is not on par with that which we've been able to create on iOS. - this is a major problem if -- like I do -- you want to include real-time audio processing in your applications.
  • On the other hand, it seems that the majority of the mobile devices in the market is soon going to be Android's: http://www.mofonu.com/2011/07/15/android-devices-130-million-and-growing-%E2%80%93-550000-devices-activated-everyday/
Native iOS Development Technologies

Some useful links to get you started
Objective-C
  • An additional layer to C that introduces objects
  • Syntax is ugly (smalltalk like), but not something you can't get used to
  • Memory management is better than C, but you still need to be very aware, unlike modern languages. However, iOS 5 will support Automatic Reference Counting (ARC), so this should alleviate the pain. (See http://developer.apple.com/technologies/ios5/)
  • Has some very features of modern languages, like automatic getters&setters, nil objects that do not causes a crash if referenced, and dynamic language features - altering existing classes, invoking methods dynamically, etc.
  • The iPhone SDK and all APIs are written in Objective-C (Including the UI layers), and as said before - you are probably going to write at least one layer of your application in it, so you definitely should learn Objective-C if you are planning on developing for iOS.
  • A GREAT summary about Objective-C's basics: http://www.otierney.net/objective-c.html
IDE (xCode)


  • Basically, it's like VisualStudio for iPhone applications. Seems like a decent tool - autocompletion works very nicely, and there are built-in UnitTests support which is great (no green bar though...)
  • Comes with a set of tools, like the iPhone simulator which is a very good way to feel how your app is going to appear on the device without actually deploying it, and other important tools like a profiler, a memory debugger, etc.
  • Will take some time to adjust to, and from first look - it's powerful, but lacks some advanced refactoring features IDEs like Eclipse have.
  • I heard some that claimed that even if you develop in other IDEs, you'll still have to compile them eventually in xCode before submitting to Apple. However, I guess this was true prior to a change in Apple's policy regarding development tools, in September 2010.
  • One prominent alternative for xCode is Appcode by JetBrains (IntelliJ dudes): http://www.jetbrains.com/objc/ - haven't thoroughly checked it out yet, so no review.
OpenGL ES


  • Official website: http://www.khronos.org/opengles/
  • OpenGL ES is a subset of the OpenGL 3D graphics API, designed for embedded devices, including mobile phones. A subset - meaning some of the features of OpenGL such as floating point operations might not be available, and you'll have to replace them with alternatives if you're planning on porting an existing desktop OpenGL application.
  • The upside of developing in OpenGL ES, besides being a strong and popular 3D graphics engine, is that it supports many platforms. Implementations always have a platform-specific part, and the OpenGL API which is the same on all platforms for a specific OpenGL API version (which unfortunately may differ between the Android SDK and the iOS SDK). So while your code won't be 100% cross-platform, it should be easily portable, especially if you create proper abstractions between the platform-specific and non platform-specific part.
  • A great set of OpenGL ES tutorials for iPhone can be found at http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-table-of.html
Cocos2D


  • Link: http://www.cocos2d-iphone.org/
  • An open source objective-C based framework for easily developing 2D games for iOS and Mac. Based on OpenGL ES.
  • Contains nice features such as scene managements, menus and buttons, tile map support, high score server, and many more.
  • Very popular - has a large community and lots of cool games created with the framework.
  • The tutorial in the official site seems very effective, and there are lots of other books and tutorials out there.
Cross-Platform Solutions

Web Based Cross-Platform Solutions


  • There are a lot of platforms that let you develop native apps in html5/javascript/etc.
  • This is a good solution for developers who already experienced in web, and do not wish to learn objective-c or other similar technologies.
  • On the other hand, although some of these frameworks allow you access to the hardware of the devices, it is limited in comparison to real native apps. Also, there are major performance limitations, and of course there's the native look-and-feel issue I mentioned earlier.
  • The most popular examples of such frameworks are: PhoneGap and Appcelerator Titanium. I must admit my research less focused on them so I can't really say how they are, but I do know they are popular and has a large community, and on the other hand - they have the known limitations mentioned earlier.
  • To sum it up, here's a nice presentation by Onavo about the dilema of Native apps vs. Web Apps:  http://www.slideshare.net/onavo/advanced-ios-engineering-the-junction-talk
Rhodes Rhomobile


  • Link: http://rhomobile.com/
  • A bit similar to the rest of the web-based cross platforms solution, except that it's Ruby based, and should be more powerful regarding hardware capabilities.
  • Personally I'm more of a python guy, but from the little I know, ruby is a really fun dynamic language.
  • According to their claim, apps written with rhodes are faster than Android apps written in Java, because it's written 
  • Hardware capabilities currently include access to GPS, camera (only still pictures), bluetooth, audio playback, barcode recognition, and more. Audio/Video capture is planned in future releases.
  • Integrates nicely to all popular IDEs, with a built in unit-testing framework, etc.
  • All in all, seems like a good option if your app doesn't require intensive graphics or performance, and you like ruby, or at least prefer it over objective-C.
Marmalade


  • Link: http://www.madewithmarmalade.com/
  • Until recently known as 'Airplay SDK'
  • A cross-platform infrastructure in C++ - mainly targeting game development but according to them "Marmalade’s sweet spot is 'rich' apps, by which we mean any combination of: great graphics; audio processing; use of device APIs such as camera, GPS, and microphone; deep C/C++ codebase; or anything else that raises your app above the level of a simple mobile website wrapper"
  • They have a plugin for the existing IDEs: either Visual Studio in Windows, or xCode in Mac - which makes it very comfortable to develop.
  • The support for platform-specific code (called EDK) gives an automatic layer of abstraction that makes it very easy to write a cross-platform app that takes advantage of native features.
  • There is a very impressive portfolio of games developed with this SDK, like games by Electronic Arts, or PES by Konami.
  • All in all, this looks like one of the top choices for developing cross-platform applications.
Unity


  • Seems like a very powerful cross-platform game engine. Has good documentation and a good community of Q&A. http://unity3d.com/
  • Most of the development is done with an editor, and the engine supports scripts in Javascript, C# and Boo. There are also many native plugins in the Pro version, and you can write them yourself in c/c++ / objective-c / java, etc. (but using it will make your game non-cross-platform of course).
  • In general, seems like this is a very strong option for game development, especially if you are developing 3D games for multiple platforms. However, accessing the microphone/camera of the mobile device + other advanced features will require using native plugins.
Flash CS5


Corona SDK


  • Link: http://www.anscamobile.com/corona
  • Based on the Lua scripting language, should be similar to ActionScript. There's a nice blogpost regarding how to port a Flash application to Corona: http://blog.anscamobile.com/2011/01/flash-to-corona-porting-guide/
  • Claims to focus on performance and from the showcase seems like there are very impressive games developed with Corona.
  • Has access to many of the device capabilities, including camera, microphone, GPS, etc.
  • There's a free unlimited trial, but you need to buy a subscription in order to distribute apps.
Afterword

That's about all I have researched and can share with you currently. I hope that with time, after gaining some hands-on experience, I'll have some more useful knowledge to share in this blog. So if you're interested - stay tuned: subscribe to the blog, or follow me on twitter.

I would like to welcome any comments you have about the information written here: if you feel I left some important information out, if you spotted a mistake or two in the data, or if you have a personal opinion about some of the frameworks I mentioned. Please leave your comments as a reply to this post. I promise to take them into account.

Edit: Thanks @philxan for mentioning I forgot about MonoTouch

  • Official Site: http://ios.xamarin.com/
  • Part of the Mono Project (http://www.mono-project.com/Main_Page) - a solution that allows you to write cross-platform C# application.
  • Basically, it's a C# framework that integrates with the desktop Mono SDK and the iPhone SDK and lets you create native applications in C# and the .NET framework. Should be interesting mostly if you're looking to port an existing C# application for iOS, or if you're an experienced C# developer and want to save yourself the efforts of learning and adapting to new technologies.
  • The IDE is MonoDevelop for OS X - looks a solid IDE, but I can't say I tried it personally.
  • Cost begins at 399$ for a personal license...
  • Has a version for Android (and naturally Windows Phone) as well
  • Here's a good site with code samples: http://monotouchexamples.com

57 comments:

  1. Just thought I'd throw this in there too, as someone fairly new to iOS. From a game development point of view, the tutorials at

    http://www.71squared.com/iphone-tutorials/

    are extremely helpful. Really walk you through things and give you a good basis for a 2D opengl es iOS game.

    ReplyDelete
  2. macincloud : you cannot install applications for macincloud without the sysadmin sayso. limited for developers i think.

    ReplyDelete
  3. HTML5 Development is very essential to ensure that web sites and mobile internet sites are easy and enjoyable to use.

    ReplyDelete
  4. HTML5 Webdesign has gotten a modern change in the whole world of web style. It provides a great foundation to make modern web styles without based on third-party plug-ins and other web technological innovation

    ReplyDelete
  5. HTML5 Webdesign provides such growth that allows better development of film and songs. It is also going to allow better system among the websites

    ReplyDelete
  6. SharePoint Development gives to maintain the information more effectively. It is like a web server that can host a number of applications.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. This comment has been removed by a blog administrator.

    ReplyDelete
  9. Hi there. Nice blog. You have shared useful information. Keep up the good work! This blog is really interesting and gives good details all about iphone apps development which is the trend to have iphone for business or individual purpose so it requires more and more developers .

    iphone development companies

    ReplyDelete
  10. This is the appropriate blog for any person who wants to discover about this subject Apple iPhone for Business.

    ReplyDelete
  11. Windows Phone Development
    may be the latest smart phone platform, but it has already taken significant market share and poses a big aggressive threat to iPhone, Android, and BlackBerry.

    ReplyDelete
  12. readings were really very good. I will bookmark this blog so that I could often visit this blog often to read the latest article from your blog. behind terimaksih awaited visit, .......



    developing mobile app indonesia | firzil.co.id

    ReplyDelete
  13. Excellent ! it is very useful post. Keep it up .

    iphone developers

    ReplyDelete
  14. Thanks for sharing this post.I found so many useful tips that I can share with my friends who are just starting to learn from ios development. Sounds pretty awesome and worth reading. - click here for full details about push notification -

    ReplyDelete
  15. Loudable information shared on iOS development. As per the iOS development concern I would like to say that there are some other options existing such as Android development, PHP development and windows application development. Thanks for sharing.

    iPhone app developer

    ReplyDelete
  16. I think for developing any iOS app, iPhone app, select the best iPhone designer to achieve your iOS Applications Development Needs. Hire an iOS App Developers online with sound knowledge in this perspective.

    ReplyDelete
  17. ipad Applications Development has changed the way individuals contemplate Applications. For the ipad Application Developers ordinary is a requesting and trialing errand. With regards to the advancement of ipad Applications, a different advantage that Seasia have is our long standing connection with the ios stage.


    iOS Applications Development

    ReplyDelete
  18. In today's Era Android Applications Development is undoubtedly an administration that no association can overlook. It's a blast for all Android Application Developers.

    Android Applications Development

    ReplyDelete
  19. Our ios App Development runs from basic diversions, to multifaceted applications – we have all in our kitty. Continuously a guide with the innovation, this is evidently the improvement group you can depend.

    iOS App Developers

    ReplyDelete
  20. Many thanks for the exciting blog posting! Simply put your blog post to my favorite blog list and will look forward for additional updates. Simply wanted to write down a word in order to say thanks to you for those wonderful tips
    Android Apps Development

    ReplyDelete
  21. iOS Applications Developers: Don't choose any developer who regards iOS development just like any other job. This is because the whole process of developing an iOS app requires a lot of effort, technical competency and loads of creativity. It won't be possible to take care of these aspects if the developer is just going through the motions of developing an app and adopts a mechanical approach towards the same. So, it's important to look for that one quality which differentiates the best iOS developers from the rest - Passion.

    ReplyDelete
  22. Awesome, that's definitely what I was searching for! Your post just saved me alot of searching around I'll make sure to put this in good use!
    iPhone App Development

    ReplyDelete
  23. I am an iPhone engineer. I was changed over my numerous iPhone Application into ipad Application. Next time I'll utilize your code. Trust this code will help me to make widespread requisition that will runs locally both on the ipad and the iPhone.
    iPhone Application Development // Andriod Applications
    Development
    // iPhone APPS

    ReplyDelete
  24. Hi This is very nice blog thanks for sharing

    For More Information You Can Visit This Website Windows Application Development Solutions

    ReplyDelete
  25. This comment has been removed by the author.

    ReplyDelete
  26. There are a number of top branded companies that are working on making iOS features apps but the increase in the number of companies are also increase that are making their own apps either for earning revenue or just promoting their brand name. In fact, many companies are thinking of apps for their business and it has become a necessity nowadays.

    ReplyDelete
  27. Windows Mobile Application Development takes lesser time and cost by enchanting benefit of proverbial Windows Mobile Apps Development environment.

    Windows Application Development

    ReplyDelete
  28. Great representation. Thanks for sharing information about to iPhone Development. your blog is rich of information.

    ReplyDelete
  29. I like to read your all posts and i subscribed you. Keep sharing nice information.IOS development is growing day by day and people are going to hire development companies for their new mobile business apps.

    ReplyDelete
  30. Mobile application development, which developed in windows operating system take lesser time as compare to others. However, android and iphone applications are more famous but these are more expensive but peoples used them.

    ReplyDelete
  31. wow, great post! your post is really informative and helpful. thanks for sharing.

    ReplyDelete
  32. I am reading your post from the beginning, it was so interesting to read & I feel thanks to you for posting such a good blog, keep updates regularly..

    IOS Development for Kids

    ReplyDelete
  33. Thanks to post this article. Mobile Application Development is play great role in business.Great job.keep it up.

    ReplyDelete
  34. Thanks for this information.I really appreciate your work, keep it up. Nowadays, with a variety of uses sky is the limit for mobile applications.

    ReplyDelete
  35. This is an extremely well written article. I will be sure to bookmark it and return to read more of your useful information. Thanks for the post. 
    Apps Development

    ReplyDelete
  36. Hello my friend! I would like to tell you that this write-up is awesome, great written and include almost all important info. I would like to see a lot more articles like this.
    windows mobile apps development

    ReplyDelete
  37. I’m really amazed with your posting skills as well as with the layout on your blog site. Is this a paid style or did you modify it yourself? Either way keep up the pleasant quality writing, it is rare to see a great site such as this one these days.
    custom website development company usa

    ReplyDelete
  38. I like the way you are writing. Your Article covers many area of marketing which includes Mobile app development. Visit Here: IOS Applications Development in Bangalore.

    ReplyDelete
  39. Wonderful blog.. Thanks for sharing informative blog.. its very useful to me..

    Mobile App Development

    ReplyDelete

  40. Thanks for sharing such informative post keep updating. Keep updating.
    Snap on our tags to know more about us,

    Web Design company in Hubli | web designing in Hubli | SEO company in Hubli

    ReplyDelete
  41. It's really informative! Thanks for the great article.
    Hvantage Technologies is leading Mobile application development , and Web Development Company in USA offering various integrated IT Services including Ecommerce Solution, SEO Services & Digital Marketing Services.

    ReplyDelete
  42. Thanks for posting useful information.You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...Really it was an awesome article...very interesting to read..
    please sharing like this information......
    Android training in chennai
    Ios training in chennai

    ReplyDelete
  43. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...

    Mobile App Development Company
    Mobile App Development Company
    Mobile app Development Companies

    ReplyDelete
  44. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.
    Android App Development Company

    ReplyDelete
  45. Great post! I am actually getting ready to across this information, It's very helpful for this blog.Also great with all of the valuable information you have Keep up the good work you are doing well.
    IOS Training in Chennai

    ReplyDelete
  46. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    Web Design Development Company
    Web design Company in Chennai
    Web development Company in Chennai

    ReplyDelete
  47. Nice blog..! I really loved reading through this article... Thanks for sharing such an amazing post with us and keep blogging...
    ios app development course

    ReplyDelete
  48. it is really amazing...thanks for sharing....provide more useful information...
    Mobile app development company

    ReplyDelete
  49. Being new to the blogging world I feel like there is still so much to learn. Your tips helped to clarify a few things for me as well as giving..
    Fitness SMS
    Salon SMS
    Investor Relation SMS

    ReplyDelete
  50. Nice blog.. Thanks for sharing informative blog.. I just want to say that all the information you have given here is awesome...great and nice blog thanks sharing.iphone app development, ios developers india

    ReplyDelete
  51. You have provided an nice article, Thank you very much for this one. And i hope this will be useful for many people.. and i am waiting for your next post keep on updating these kinds of knowledgeable things...
    iOS App Development Company

    ReplyDelete
  52. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.
    Texting API
    Text message marketing
    Digital Mobile Marketing
    Sms API
    Sms marketing

    ReplyDelete
  53. great and nice blog thanks sharing..I just want to say that all the information you have given here is awesome...Thank you very much for this one.
    web design Company
    web development Company
    web design Company in chennai
    web development Company in chennai
    web design Company in India
    web development Company in India

    ReplyDelete
  54. These ways are very simple and very much useful, as a beginner level these helped me a lot thanks fore sharing these kinds of useful and knowledgeable information.

    snapho

    ReplyDelete