Wednesday, January 23, 2013

Hello iPhone

Today I am going to show you how to create a simple "Hello World" application or as I like to call it "Hello iPhone". There are many ways that this application can be created but I am going to show you the most easy way possible, where there is not much typing needed.

You will need to have a computer that runs Mac OS X, apple only wants developers who have there products. Second, if you have an app store on your computer, open it and search for Xcode and download it. Xcode is the software you use to create the application. It should look like this:
Open Xcode, a screen should pop up, you should hit a button that looks like this: 

Once you have hit that button, a big screen should put up asking you what type of Application you are on. Make sure that you are on IOS application and that you have clicked on the type of application that says Single View Application. Hit the next button on the button of the screen. This screen should show up next: 
This screen is final set up for the application so it will be easy to create the application. On the product name enter Hello iPhone, which will be the name of the iPhone application. For Organization name and Company Identifier name it whatever you like. Make sure for devices that it is NOT selected to Universal which means that it will make both an iPhone application and a iPad application, instead select only iPhone. Make sure Use Storyboards and Use Automatic Reference Counting are checked. and make sure Include Unit Tests is not checked. Just click the Next button and click the Create button.

You will notice that there are five files that are important just click on the one that says MainStoryboard.storyboard. Once you click that you should have a screen that looks like this:



Currently, this will make an iPhone app for the iPhone 5 which has a bigger screen then the original iPhone. We will be making this application for the old iPhones that use a smaller screen. You will need to hit a button to shrink the screen of the iPhone. The button looks like this:
Once you have hit that button, you will be working with any iPhone older than the 5. You should also notice that iPhone size should have shrunk. Click on your view that says View Controller under it, that is your canvas to make your iPhone app. You should notice that you have something similar to looking like this:

Use the search bar and type in Label. Just double click on the label and it should pop up on  you screen. You can move the label where ever you like. I personally move the label in the Center. Click on the Label that is on your iPhone and just type "Hello iPhone". From there on the top left you will notice a button that says run with a play button icon, press it and your iPhone should pop up running your application. It should look like this:


You have just created an iPhone application. it is really easy to create an iPhone application. Apple has made it very simple. you just have to type a few things. You are now an apple developer. 

No comments:

Post a Comment