Getting started with OS X and iOS7 development in XCode

Skyline of Toronto (Ontario, Canada), as seen from Toronto Islands

Toronto skyline – September 2013

Thanks to social media and the internet, it has become a lot easier to quickly reach people with a common interest. ‘Meet Up’ groups are a nice example of this. You literally get a choice out of hundreds of groups. Especially in the big cities and their surrounding suburbs the choice is plentiful.

I have been going for years to a ‘Meet Up’ group in Toronto (Ontario, Canada) which specializes in all things which combine high tech and creativity. This group started out as FITO, which stood for ‘Flash in Toronto’. Long before Apple made Adobe’s life difficult by not supporting Flash for its iOS mobile operating system, this group went way beyond Flash and as long as it was new, creative and computer based it was welcome. But the name did not really cover the load any longer. The declining interest in Flash itself over the last few years was actually a good excuse for changing the name to CreateInTO. And we have seen remarkable presentations, once a month, every fourth Wednesday. Among the most recent presentations we saw the Oculus Rift (a few weeks before FaceBook announced it was buying it) wearable 3D monitor system, the Bubl 360 degrees camera, an OpenFrameworks demo on Mac and Raspberry Pi. OS X and iOS actually are often the tools used, even if not necessarily the subjects of the presentations.

A few months ago somebody was trying to start up another Meet Up group in Mississauga (Ontario, Canada) for people interested in programming. From the start it was decided that this group would in the first place be looking at development for mobile, and be open to suggestions and people from all levels of expertise (including beginners) and backgrounds. In the first few meetings a choice was made to look into programming for iOS. But it became clear that the group would also cater to other systems and that members would freely help each other with whatever system somebody would need help with. To get our feet wet, so to speak, we decided that starting on our own trying to put a typical ‘Hello, World! ‘ program together was the way to go. Talking about iOS that means programming in Objective-C and with the Apple XCode IDE (integrated development environment) on an Apple Mac.

I was intrigued by the use of Objective-C and by the way this translated into graphical environments such as OS X and iOS. With Objective-C being based on the C language and the Apple systems being based on a framework from the mid eighties, brought back by Jobs from NextStep to Apple, I decided to make this first ‘text showing’ program (yes, I am sick and tired of ‘Hello, World!’) a test case. That is a test case for showing the progression from a terminal based C program, over an Objective-C based terminal program, towards a graphical based (GUI) program, first for OS X and then for iOS7. This shows the use of different code libraries and the use of GUI frameworks as provided by Apple. It shows clearly how much more code is involved in GUI programs. But it also demonstrates how much of the code is provided by Apple.

So I ended up with four examples, the first of which also included an introduction mentioning where it all comes from. It also is a good introduction in the use of XCode as a development environment. Apple makes XCode freely available to everyone who has a Mac computer. It consists of a set of tools which goes way beyond just a developer’s editor. Apart from the compiler and linker integration, there is also source version control Git, a profiler, a debugger and a graphical drag-and-drop editor for the visual aspects of the program. What is also very nice is the iOS simulator, with which you can see your program running on a simulated iPhone or iPad.

Because these examples are supposed to also show how they are put together in XCode, they contain numerous screen shots, detailing step by step the complete creation of the programs. I have included the guides for these examples in PDF format:

Intro and C in terminal on Mac:       BeginningProgramDevelopmentforOSXandiOS_Part_I

Objective-C in terminal on Mac:       BeginningProgramDevelopmentforOSXandiOS_Part_II

Objective-C graphical on Mac OS X: BeginningProgramDevelopmentforOSXandiOS_Part_III

Objective-C graphical on iOS:           BeginningProgramDevelopmentforOSXandiOS_Part_IV

Just one last note on Objective-C. It is not so that an Objective-C framework is only available in OS X and iOS. There is a system, called GNUstep, available on Microsoft Windows and on Linux too. Maybe that is a good subject for another post.

Chris Rogiers for CeaRO Corporation, April 18th, 2014

One thought on “Getting started with OS X and iOS7 development in XCode


    Wow! You provide nice programming guides in the PDF’s. Make sure to link to this entry on the mobile development meetup page, to complement your attendance.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>