0 1 00:00:00,360 --> 00:00:05,010 Let's first tackle how to create and set up a new iOS project from scratch. 1 2 00:00:05,850 --> 00:00:12,780 So when you first open up Xcode, it should show you a "Welcome" screen, and we can get started straight away 2 3 00:00:12,780 --> 00:00:18,300 by clicking on the link here that says, "Create a new Xcode project." 3 4 00:00:18,300 --> 00:00:25,260 Now, if you don't see this welcome screen, it might be because this checkbox is disabled, 4 5 00:00:25,260 --> 00:00:31,090 so you can also go over to File, New, new Project to do exactly the same thing. 5 6 00:00:31,110 --> 00:00:36,940 So let's go ahead and create this new Xcode project. 6 7 00:00:37,000 --> 00:00:41,350 Next, we get to choose the kind of template we want for our new project. 7 8 00:00:41,500 --> 00:00:49,960 And firstly, up here, we've got different tabs for creating watch apps, tvOS apps macOS apps, et cetera. 8 9 00:00:50,020 --> 00:00:58,540 But what we want is an iOS app. And by default, the Single View Application is selected. 9 10 00:00:58,540 --> 00:01:00,910 And this is the most customizable type of template. 10 11 00:01:00,910 --> 00:01:07,400 It basically doesn't assume anything about your app and you're free to modify it as you need to. 11 12 00:01:07,420 --> 00:01:13,090 Now for some of these other templates, for example, the Master-Detail App which looks like this 12 13 00:01:13,090 --> 00:01:19,750 where you've got the master and detail. So it's a bit like the male app on iPad and usually it is used for large 13 14 00:01:19,750 --> 00:01:25,870 screen size where you can actually have this kind of multitasking 14 15 00:01:25,930 --> 00:01:26,460 or another popular one is the tabbed app. 15 16 00:01:26,500 --> 00:01:32,230 So this is where you have the tab bar at the very bottom and you can click between these different tabs 16 17 00:01:32,290 --> 00:01:34,740 to see different pages on the app. 17 18 00:01:34,750 --> 00:01:40,690 Now it's important to remember that even if you choose a Single View App at any point later on if you 18 19 00:01:40,690 --> 00:01:47,020 decided that you needed a tab bar or you needed to make it have Augmented Reality or if you needed a 19 20 00:01:47,020 --> 00:01:51,200 Master-Detail type of format, you can always add it. 20 21 00:01:51,220 --> 00:01:57,310 So I always tell students to just start off with a Single View App, and then, later on, depending on what 21 22 00:01:57,310 --> 00:01:58,170 it is you need, 22 23 00:01:58,300 --> 00:02:00,940 you can always add it at that point. 23 24 00:02:00,940 --> 00:02:06,160 So now that we know what our template is all about, let's go ahead and click next. 24 25 00:02:06,160 --> 00:02:11,920 On this screen, it's really, really important that you don't skip ahead because you have to change this user interface 25 26 00:02:12,010 --> 00:02:18,350 from SwiftUI to Storyboard in order for the rest of the lessons to actually make sense. 26 27 00:02:18,640 --> 00:02:23,830 And after you've done that and checked to make sure that your user interface says Storyboard, 27 28 00:02:23,830 --> 00:02:28,230 then we can continue with the rest of the lesson and add a product name. 28 29 00:02:28,240 --> 00:02:35,440 So this is going to be the name of your app. And we're going to call ours I Am Rich. 29 30 00:02:35,440 --> 00:02:42,910 and noticed how down here it's already starting to build out a bundle identifier. Now a Bundle Identifier is kind of like 30 31 00:02:43,000 --> 00:02:44,060 a web address. 31 32 00:02:44,590 --> 00:02:51,730 It's meant to be something that's unique and it will identify your app uniquely on the App Store and 32 33 00:02:51,730 --> 00:02:57,760 you can see that it's created by what's called a reverse domain name. So whereas normally, would be something 33 34 00:02:57,760 --> 00:03:02,830 like your company.com when they put the com at the beginning, and then it's the name of your company. 34 35 00:03:03,580 --> 00:03:06,810 And that comes from your Organization Identifier. 35 36 00:03:07,330 --> 00:03:13,270 So the organization name, you can leave blank, and the Team, you can leave as none for now. We'll revisit 36 37 00:03:13,270 --> 00:03:17,930 this a little bit later on when we actually need to launch our app on a physical device. 37 38 00:03:18,190 --> 00:03:21,690 But we should add an Organization Identifier. 38 39 00:03:21,940 --> 00:03:29,220 So for example, our company's web address would be www.appbrewery.co. 39 40 00:03:29,260 --> 00:03:37,900 So all Organization Identifier because we're taking a reverse domain name would be co.appbrewery. 40 41 00:03:38,590 --> 00:03:41,470 So it would look something like this. 41 42 00:03:41,470 --> 00:03:50,260 And the final Bundle Identifier is this, plus this, and we get a unique URL because most companies 42 43 00:03:50,260 --> 00:03:54,700 have a web address and because web addresses are unique. 43 44 00:03:54,700 --> 00:04:01,230 This is a really simple way of ensuring that a company's app is uniquely identified on the App Store. 44 45 00:04:01,340 --> 00:04:05,010 Now what if you don't have an organization identifier? 45 46 00:04:05,020 --> 00:04:06,790 What if you don't have a website? 46 47 00:04:07,030 --> 00:04:09,450 Then I recommend just running com. 47 48 00:04:09,580 --> 00:04:10,830 and then adding your name, 48 49 00:04:10,840 --> 00:04:14,020 so it could be Angelayu for example. 49 50 00:04:14,020 --> 00:04:19,840 This doesn't actually matter as long as there's nobody else who has used this Bundle Identifier using 50 51 00:04:19,840 --> 00:04:23,450 your name to try and publish an I Am Rich app on the App Store, 51 52 00:04:23,590 --> 00:04:25,110 then you'll be completely fine. 52 53 00:04:25,150 --> 00:04:31,210 Now the very last thing to check is to make sure that the Language that you've chosen to program with 53 54 00:04:31,600 --> 00:04:39,160 is Swift and the User Interface is chosen as Storyboard. In later modules, we're going to be diving 54 55 00:04:39,160 --> 00:04:40,560 into SwiftUI. 55 56 00:04:40,690 --> 00:04:46,780 But we'll need to learn a lot more about Storyboarding and Swift before we can get there. And for the 56 57 00:04:46,780 --> 00:04:52,510 rest of the checkboxes, you can leave them unchecked, like I have here. And then go ahead and click next. 57 58 00:04:53,440 --> 00:04:57,220 Now it's going to ask you, "Where do you want to save your app?" 58 59 00:04:57,220 --> 00:05:03,850 And if you have a specific folder that you want to save it to, then this is the point to go ahead and 59 60 00:05:03,850 --> 00:05:05,600 navigate to that. 60 61 00:05:05,620 --> 00:05:11,470 Alternatively, you can simply save it on your desktop if it's not too cluttered, or simply just create 61 62 00:05:11,470 --> 00:05:17,100 a new folder called Development and you can start saving all your projects in there. 62 63 00:05:17,110 --> 00:05:23,680 Now we're going to go ahead and click Create and it will generate all Xcode project for us. 63 64 00:05:24,280 --> 00:05:25,270 So that's it. 64 65 00:05:25,270 --> 00:05:28,640 That's our brand new Xcode project created. 65 66 00:05:28,660 --> 00:05:33,200 And remember that Xcode automatically saves all of your changes. 66 67 00:05:33,340 --> 00:05:39,920 And if you ever want to locate where this project is, then simply go to the very top over here, right-click, 67 68 00:05:40,340 --> 00:05:42,180 and click on Show in Folder. 68 69 00:05:42,350 --> 00:05:47,960 At which point, it's going to show you where it is on your computer. And if you go on to this view, you'll 69 70 00:05:47,960 --> 00:05:53,250 be able to navigate all the way up to see where it's actually located. 70 71 00:05:53,360 --> 00:05:59,390 In my case, it's simply on my desktop in a folder called Development. Once that's created, 71 72 00:05:59,420 --> 00:06:05,450 if at any point you want to pause the course and you want to close down Xcode, then you can always go 72 73 00:06:05,450 --> 00:06:12,980 back to where you saved it, open up the project folder, and then your project is located inside the file 73 74 00:06:13,050 --> 00:06:15,910 called I Am Rich.Xcodeproject. 74 75 00:06:16,190 --> 00:06:20,880 And if you double click on it, it will open it right back up where you left off. 75 76 00:06:20,930 --> 00:06:27,140 So now that we've seen how to create a brand new project, the next step is to take a look around Xcode 76 77 00:06:27,440 --> 00:06:30,400 and familiarize ourselves with our working environment.