Hey everybody. This is Caleb with devslopes.com and welcome to the in-app purchase target topic. I'm so stoked to teach you everything you need to know about consumable and non-consumable in-app purchases. There's a lot to learn, so we're going to dive right into it now. Let's go ahead and let's begin by actually creating our Xcode project. So pull open Xcode and we're going to dive right into it. Let's go ahead and just click on Create new Xcode project just like that, choose single-view application, and we're going to need to pay attention here to our product name. So I'm going to think, what do I want to call this? I'm going to call it Foodzilla, just like that, and now our organization identifier is com.devslopes, and our bundle identifier is com.devslopes.foodzilla. This of course is going to be different for you simply because you're going to have a different organization identifier, but we will need this later on. We're also going to need the product name. So let's go ahead leave everything unticked and go ahead and click "Next" just like that, and I'm going to go ahead and save it here to my folder that I have used here, beautiful, save it wherever, and you'll see that it automatically manages all the signing for you which is going to come in handy. What else? Let's see. We have everything here, why don't we go ahead and add in our assets, so we're going to drop on the images we'll be using, and you can download these from the source code. There's a little button with a folder and little download icon. If you tap on that, it'll allow you to download those files, or if you're on an iPhone, you can airdrop them straight to your Mac, pretty cool. So go ahead and drag in these image sets, and as you can see, they all add improperly. We have a close button and we also have some pictures of food. Because in this course, we're going to make a restaurant app that lets you basically go on, choose a food item, and you can buy it using in-app purchase. We're going to have ads displayed which will basically allow you to use a non-consumable purchase to hide the ads. It's going to be pretty cool. That's a pretty common way that non-consumable are used in consumer facing apps. So now that our assets are properly added, let's go ahead, I want to show you actually a demo of a finished version of Foodzilla. So I'm going to go ahead and collapse this and pull open my simulator. All right. So here we go. There is my iPhone, by the way, for testing in-app purchases sometimes the simulator can be finicky, sometimes it might work, sometimes it might not work. So with that in mind, I'm going to go ahead and show you this on my iPhone how it works. I have it set up right here in front of me. So in our app, what you can do here is you can go ahead and select a food item. You can see a picture, its price, its name, and you also see an ad, a very annoying ad, mind you. Now, if I wanted to go ahead and buy the salmon meal, I could tap by item for 999. Of course, it's going to ask for the password for my test account, which will create those later on. Sandbox users, I'm going to login. It will present me with a pop-up saying do you want to buy one meal for 999? If I tap buy, you'll see it will present me with a, "Your purchase was successful", and it also presents, "Hope you're hungry, you just bought a meal." There is a consumable purchase, so check it out. I can tap it again, I can buy it again, over and over and over again your purchase was successful. But what if I wanted to remove these ads? All I need to do is tap on buy, hide ads for $0.99, and this is an example a non-consumable in-app purchase. If I tap buy, it says, "Hey, you've already purchased this, would you like to get it again for free?" That's also a cool thing about non-consumable purchases, which we'll talk about later on. If I tap okay, it says, your purchase was successful, and take a look, the ads are gone, the button is gone, and we now have a clean ad-free user experience. That's pretty cool now, but another thing I need to show you is restoring our purchases. Let's say we've already purchased the hiding adds functionality, but maybe I've got a new phone and I redownload this app and boom the ads are back. But with restore, we have the ability to restore those in-app purchases just like in many other apps you've probably used before. So I want to show you how that works, but in order to do that, I'm going to have to go ahead and uninstall this, and then bring it back up, so just a moment. Here we go. So check it out guys. If I open up the app, you'll see the ads are back. If I close it and I tap the restore button, it's going to restore the purchases that I've already made. So when I tap restore and check it out, if I go into salmon, you'll see my purchases have been restored just like that. Super, super cool. Now, of course, we are using UserDefaults to store the hidden and shown status of the ad. So if I go out and quit and come back in, you'll notice the ads are still gone. Super, super cool. So this is what we're going to build. We have now properly set up our Xcode project with our assets. We've also given it a name and we've paid attention to the special bundle identifier. So let's go ahead and head over to the next video where we're going to dive into iTunes Connect. The place where we're going to create this on Apples and in their server, and then link the two together. Very, very cool. Let's go ahead and do it right now.