
- #IPHONE XCODE HOW TO#
- #IPHONE XCODE CODE#
#IPHONE XCODE HOW TO#
We do not get into unit tests in this book they are simply a tool for developers to use on large projects and not needed to learn how to develop for iOS.
#IPHONE XCODE CODE#
Unit tests are small pieces of code written to test discrete chunks of application functionality.
ProjectTests: Inheriting the same name as the project, but with Tests appended, this folder contains what are called unit tests for the project. Products: Anything produced by Xcode is included here (typically, the executable application). Most of your development will be within a file located here. As you’ll learn in the next hour, classes group together application features that complement one another. Project Code: Named after the project, this group contains the code for the class files and resources that you add to your project. Within the project group are three subgroups: The Xcode layout is designed to help you find what you’re looking for easily, not to mirror a file system structure. You won’t necessarily find all these files in your project directory, nor will you find the same folder structure. The folders you see in Xcode are logical groupings. Your screen will look similar to mine shown in Figure 2.3. The Use Core Data check box should be unchecked. Set the Language to Swift (Apple’s new preferred programming language), and then choose which device (iPad or iPhone) you are using from the Device Family pop-up. Go ahead and enter HelloXcode as your product name, and then provide an organization name and a company identifier of your choice. If you do not own a domain name, you’ll need to enter something, because this is a required field. I own the domain, so I enter com.teachyourselfios in the Company Identifier field. Together, the product name and the company identifier make up something called the bundle identifier, which uniquely identifies your application among all other iOS apps.įor example, in this hour, we create an app called HelloXcode. This is typically the domain name of the organization or individual producing the app, but in reverse order.
The Company Identifier field is a bit different. The product name is the name of your application, and the organization name can be anything you want, such as your name or your company name. For this tutorial, click the Single View Application template, and then click Next.Īfter choosing the template, you are prompted for a product name, organization name, and a company identifier. On the right side of the display are the templates within the category, with a description of the currently highlighted template. Our focus is on the iOS Application category, so be sure that it is selected. We use several templates throughout this book, depending on what type of application we’re building.Īlong the left side of the Template window are the categories of templates available. This topic is beyond the scope of this book, but you can read more about Core Data using the Xcode documentation system discussed in the next hour.Īlthough it is possible to build an application completely from scratch, the time saved by using a template is significant.
Core Data is an advanced means of storing application data that may be of interest as your project’s needs grow.