October 13, 2014

Getting Started in iOS App Development

Are you new to developing with Apple software? This blog is perfect for beginners and explains the tools you need to begin iOS app development. 

Setup Development Environment

Before starting application development, you will need to set up the application development environment.

Make sure you have the following tools:

  • A Mac computer with version OS X 10.8 or later
  • iOS SDK
    • This is a software development kit released by Apple that enables developers to write iPhone, iPod, and iPad applications. The iOS SDK includes Xcode IDE, phone simulator, frameworks, and compliers. To download iOS SDK you must have an Apple developer account. The software occupies about 500 MB of storage space.
  • Xcode
    • Xcode is an integrated development environment from Apple that has an editor, graphical user interface, and many other features. You can download Xcode for free on your mac using App Store application, or you can click on following link to download it. https://itunes.apple.com/us/app/xcode/id497799835?mt=12 


Downloading Xcode

Click the above link, and Xcode will open on a browser and will show you the following screen.




Click on the “View in Mac App Store” button and then click Launch Application when prompted. It will open the App Store application on your Mac.




You will see a “Free” button on the left hand side, click this and it will prompt you to enter the user name and password for your apple developer account. If you are not registered with Apple, you can create an Apple ID here (include link to: https://appleid.apple.com/account)

Once you enter your account information, your application download will start. After Xcode downloads, it’s now time to start your application development.


How To Create A New Project Using Xcode



Open Xcode and click the “Create new Xcode Project” option. 

There are many templates in Xcode, but we will start with the Single View Application template.




Click next and then fill in your information on the next screen.

  • Product Name: Your application name
  • Organization name: Your organization name or you can leave it blank
  • Company Identifier: Uniquely identifies your application in the App Store
  • Class Prefix: If you want to give your classes a prefix you can use, enter it here
  • Device: Select iPhone




After clicking next, Xcode opens with a new window known as the Work Space Window. From here you can create and run applications.




At the top of the screen in the tool bar area, select iPhone retina (3.5 –inch). Click on the “Run” button (circled in the photo below) to run the application in a simulator.




The simulator is a testing device for applications before you run them on an actual device. The iOS Simulator lets you test your applications quickly as you build them, and can simulate multiple devices.

After running the application on the simulator, you will see a blank screen like the one below.



You have now successfully set up all you need to create your first application.

Now that you have Xcode working, I will explain the software more in depth.


More about Xcode

Xcode has four main areas, which are shown in the figure below.

  • Toolbar Area
    • The toolbar area gives you easy access to popular project configurations and management tools.
  • Project Navigator Area
    • Use the project navigator area to view and access different aspects of your project including files and folders.
  • Editor Area
    • This is the main area in the Xcode workspace that is always in the middle of the screen. Most development work is done in this area.
  • Utility Area
    • The utility area allows to you use inspectors and available templates in your project.




How to Add Controls To your Application

In the project navigator area workspace there are the following files:

  • AppDelegate.h
  • AppDelegate.m
  • Main.Storyboard
  • ViewController.h
  • ViewController.m

Storyboard is a new feature for iOS developers and is introduced in Xcode 4.2 and iOS 5 SDK. Before Storyboard, developers could only work on a single screen of the application at a time. With storyboard you can see all screens at once.

Now, click on the Main.Storyboard file in your project navigator area, and you will see a visual editor in the Editor Area where you can place your controls.

From the Utility Area open the Object Library, select a label from it, and drag it into the Storyboard screen in the Editor Area. Then change the text of the label by double clicking on it and typing what you want it to be. In my example I wrote “Hello World.”



Now run the application (the arrow button in the top left of the screen), and you will see “Hello World” on your simulator screen.



Congratulations! You have now created your first iOS application! 


Contact Us

    We take your privacy seriously will only use your personal information to administer your account and provide information and services you've requested. For more
    information, check out our Privacy Policy.