‫-: Hi. Within this lecture we are going to see how
‫to run our simulator in order to simulate and test our code.
‫And so far we didn't write any code, but actually
‫we have just added a new label over here, right?
‫So we see the Hello Swift over here
‫and we are not gonna leave this as it is.
‫We are going to change this app a little bit.
‫We're going to build an app,
‫but for right now I'm going to show you how to create
‫an simulator and how to choose one and play one.
‫So if you don't see any options over here
‫you can go to add simulators.
‫If you click over here, you can choose the simulators
‫from this tab and you can choose whatever you want.
‫Right now I only have iPhone 8, X and XR
‫and I can delete or rename it in the way I want.
‫It doesn't matter which name I'm using because I can click
‫on this plus button and I can choose whatever phone
‫whatever iPad version I want
‫and I can rename those simulators
‫and I can create new devices.
‫As you can see, for rating system version
‫I have now iOS 13.
‫If I want, I can download more simulator run times
‫and I can have more operating system versions from here.
‫And in fact, I don't need any of the simulators right now.
‫I'm good to go with iOS 13.
‫So for example,
‫you can just create an iPhone seven like this.
‫And when you create this kind of devices,
‫you can choose one of them and you can run your code,
‫You can run your app inside one of these devices
‫as a simulator on your MacOS.
‫And it's very easy to do that.
‫You can go over here and choose just one.
‫And in the top option you will see something
‫called, No Devices Connected to my Mac.
‫And if you actually connect your iPhone using a USB,
‫you can choose your own iPhone and you can test your apps
‫on your own iPhone.
‫I'm not going to do that
‫because Apple has some kind of limitations.
‫Like, you can just run 10 apps per week on your own iPhone
‫if you don't have a developer account registered.
‫So for right now, we don't need that.
‫So not to complicate things,
‫I suggest you to try these apps,
‫try your apps on your simulators rather than your phone,
‫and there will be exceptions of that, obviously.
‫For augmented reality apps or for push notification tests
‫you will need your iPhone
‫or you will need a device like iPad.
‫And we are going to go into all of those matters later on.
‫But for right now,
‫just choose one of these predefined phones,
‫predefined simulators over here like iPhone XR.
‫And if you click on this round button,
‫if you click on the play button,
‫it will just compile your code
‫and it will display your app for you in the simulator.
‫Right now we don't have any code, but we have a label.
‫We can see how our label will look like
‫in the real iPhone XR using the simulator, right?
‫Once you do that, if you're starting for this first time
‫it can take some time,
‫like a couple of minutes maybe.
‫And you will see a screen like this.
‫So this is going to open your app.
‫This is going to open your phone first
‫and then install the app on your phone
‫in your simulator and then display displayed for you.
‫And this may take a couple of minutes.
‫As I said, this is being a little faster
‫for me because I have run this before.
‫And as you can see now I can see my Hello Swift label
‫in my phone and I can see exactly
‫what it will look like when somebody downloads to,
‫downloads this app to their, your iPhone XR model.
‫Okay, so we are going to test our apps using this simulator.
‫We're going to run some code.
‫We are going to play this on our simulators
‫and we will see how it will react under real circumstances.
‫And this is actually a phone,
‫you can use this,
‫like you can go to the internet with this.
‫You can just play around with this simulator.
‫But we are just using this simulator.
‫We are just using this phone for task purposes, okay?
‫But this is functioning iPhone simulator.
‫Like I can go to settings
‫and I can change whatever I want from here as well.
‫So I can close and I can open.
‫I can go back and front as in a regular phone.
‫So this is how we create,
‫this is how we work with the simulators.
‫Right now I'm going to stop here
‫and within the next lecture we are going to design our app.