Creating First iOS Application

Dheeraj Kumar Gunti

Reading Time : ( words)

Hi All,
Welcome to the first iOS Application. In this tutorial we will see how to create a basic iPhone application. I will be illustrating in a straight forward way where you will know the basic structure and execution of an iPhone application.

Lets get started.

First of all for creating an iPhone application with Xamarin Studio you need to register in Xamarin and get a Trail license which works for 30 days. Or else you can have an start up Indie license.

Once the setup is completely done, Open the Xamarin Studio.

Click on New Solution button on the top left corner in the startup screen. You will see an New Solution dialog window. Where you need to choose Unified API and then choose iPhone and select Empty project. Provide a meaningful project name and click on Ok.

There we go.. We are ready with default project structure of iPhone application.

Lets see what are all there in the application structure.
References - Where you see basic reference of an iPhone application. Nothing much as of now we do here.
Components - Where you can include third party components from Xamarin. Download them from
Resources - Its basically an asset library where you can include documents, audio files, video files etc. and all the images with respect to your application will be seen here.
Info.Plist - This is a property list file where you see all the basic properties of iPhone application.
AppDelegate - This is the Initial point of an application execution.
Now, we will add a controller to this project. For that right click on the project and select Add and Choose new item.

You see a new controller is added to our project.

In the above structure you see a class file and a designer file (.xib - XCode Interface Builder). Double click on the .xib file, it opens the file in XCode.

We will see more about XCode designer in the furthur articles.
In the right bottom corner you see control list section which has all the iOS Controls. You can drag and drop the specific control as per your need. Now we will drap and drop a Label(UILabel).
We change the properties of the Label from the Property Window as below.

Save the file and Close XCode. You see here the changes we did to the designer file will be synced to Xamarin Studio.

Save the Application and Click on Run to see the result in iOS Simulator.

We can change the properties of application in either Info.Plist or right click on the project and choose Options. For an iOS application, iOS Signing and iOS Application are more important. If you are little bit familier about Profiles and Certificates for an iOS application, here is the place where we choose them for bundling our appliciation. If you are not familier about that Don't worry, you can know about them in the other articles.
In iOS Application, we specify version, Name of the application, Bundle Name, Images, Icons etc. We see more about this in further articles.

Enjoy Coding your first iOS Application.