Xcode projects are groups of files and folders that have code, user interface, and other information about your apps. See how to create an Xcode project here in Xcode 8.
- When you open up Xcode for the first time after installing the additional required components, you're going to see the welcome screen which allows you to quickly create a new project or open an existing project. From here what we want to do is create a new Xcode project. You can do that either from the File menu, going to File > New > Project, keyboard shortcut Shift Command N, or by simply clicking right here on the welcome screen to create a new Xcode project. So when I do that, a menu opens up for me to choose a template for my new project.
The Tab bar at the top enables you to choose a platform. For this course we are only going to be using iOS for the platform. We're also only going to be using the Single View App application template. But note that there are other templates to choose from if you want to go a little bit further in creating an app. There are courses on this in the library, including my series for iOS 11 Essential Training.
For now we're going to stick with Single View App which is going to give us a template that just provides a blank user interface. So I'll hit Next from there, and I'll give this a product name of First App. For Team I'm going to leave None. Team is actually for connecting your iOS Developer Account to Xcode. For this course, we don't need a Team set up. For Organization Name you can put just your name, for Organization Identifier, you can put some kind of identifier in there, it really doesn't matter.
Since I own toddperkins.com I'm actually using something known as a reverse domain structure. So we put the com in front of the toddperkins and that gives us a unique bundle identifier which is an ID for your application. But for now that's not really important because we're not going to be uploading this application to the App Store. For Language make sure you have Swift selected. Leave all these three options unchecked and then hit Next. Now I'll choose where to save it. So I'm going to go into the Exercise Files on my desktop, Chapter 01, First, Final, I'll save it right in there.
If you're following along with the Exercise Files, just save it outside of that Final folder so you don't create any conflict with an existing project. Make sure you also have Create Git repository unchecked. So hit Create and then Xcode is going to create a series of files and folders on your computer that are going to be similar to what you see on the left side here but not necessarily an exact match. And just to point that out I'll tab over to Finder and if we compare this file and folder structure to what we see on the left side of Xcode right here you'll see that it's got a lot of similarities but it's not necessarily exactly the same.
And for now, don't worry about how it's all organized. I just want to point out that it's not exactly the same as the file system because some applications and platforms who you develop for do mirror your file system. Xcode gives you a little bit more independence where you can organize the files and folders however you want independent of the file system. So, with that said, we have successfully created our first project. So to review, you can create an Xcode project by going to File > New > Project or using the keyboard shortcut or the welcome screen.
Choose a project from the template, give it some basic information, choose a place to save the project, and then Xcode creates some files and folders on your computer.
- Installing Xcode
- Creating an Xcode project
- Understanding variables
- Connecting visual objects to variables
- Understanding methods
- Connecting a button to a method
- Using conditional statements
- Setting up the user interface (UI)
- Building a complete iOS app