Hi there! this is a tutorial to get you started developing native applications for iOS. We will be building a very simple “Hello World” application. Even thought we will approach the development process from a very practical, hands-on point of view, you will be introduced to some theoretical aspects when needed, to understand the underlying concepts.
Our application will be a single view iOS App that asks the user for a name. The user can enter this name in a textfield input and then click on a “Say Hello” button to generate a personalised “Hello world!” message, that will appear in a label at the top of the screen.
This apparently simple application will allow us to dig into concepts such as the MVP (Model View Controller) paradigm, Xcode, basic swift data types, storyboards, view controllers, Object-Oriented programming in swift, outlets, actions, and many more that are the foundation for more complex applications.
The concepts and techniques you will learn here will serve you to build more serious applications later. Let’s start by getting the tools.
It’s not mandatory, but it’s recommended that you go through the “Swift, crash course” first to get a grip on Apple’s new language. However, we will be explaining the necessary programming concepts as we progress in the app development, so don’t worry, you will probably have no trouble following along this tutorial, even if you know nothing about swift yet.
The de-facto tool for developing apps for iOS is Xcode. Currently, it’s on its 8th version.
First thing you need for running Xcode and building iOS Apps is getting a Mac. I won’t recommend you to build or get a hackintosh. You can probably find second-hand macbook airs and pros at a good price. Xcode used to be a pretty lightweight IDE, but that’s not true anymore, so you might want to get a mac with at least 4Gb of memory, ideally 8Gb of memory if you can afford it. Having an SSD drive it’s also going to make a difference when loading and managing your projects.
Next, you will need to download Xcode from the Apple developer website. You will need to open an Apple account with an associated ID, but you don’t necessarily need a paid developer account unless you plan to deploy your apps in a real device. We’ll get to that later in another series of tutorials.
Once Xcode has downloaded, you can double click on it to install the IDE. Once installed, you will have an application icon somewhere in your Applications folder or your launchpad. Locate it and open Xcode. It will probably ask you to download additional required components, with a dialog similar to this one:
You should accept and install those. It contains, among other things, the simulators that we will be using to run our applications without needing an actual device.
Finally, after all this process, we will be able to open Xcode and start working with it. When you do, you will be presented with a bootstrap screen to get you started with your first project.
In the next episode of “Your First iOS Application”, we will create our new project, have a look at how a project is structured, and go through the Xcode interface and the most common elements that you need to master to feel comfortable before writing any code.