Sign this lesson we learn how to start a new command line project and how to print some values.
That is how to out food.
Somebody so to do that.
Let's jump back into Mexico.
We're going to go here to explore that I'm going to say file new project.
And up until now we have been doing Iowa's single view applications.
But for now I'm going to move into my course we look for something called command line tool.
So it's starting a new project in a sort of Iowas single view up.
I'm going to go to my quest command line tool and I'm going to say Give me a command line tool and this
is my command line through 0 1 and the next and I place it in the same misthought as usual.
And now I have a command line tool which is quite different than when you have an all US application
a command line to essentially is a tool that you can run it in a terminal.
So it essentially does some things at a terminal level in your Mac operating system.
We are however not going to do that all of you are going to do is we're going to use this interface
for learning programming.
And the first thing that we have to do is we have to learn what happens if we build and run this application.
So let me build and run it.
And as you can see them all and it builds and runs.
It compiles this application.
It goes through all different lines and does exactly what this one asks it which is printing hello world
which is this.
So let's quickly talk about that and to do that I'm actually going to reformat this text a little bit.
I'm going to say this thing this curly bracket down there on this line here it automatically indents
itself because it is nested inside another one.
And at some point we will talk about all of these things but the only line I want to talk about right
now is this one which is essentially our print command.
So if I say and Aslaug and I say this log This is Iowa s boot camp as you can imagine the moment I run
the application it does.
It prints the same thing it prints one line of saying hello world and other line of printing.
This is Iowas food.
Although this may seem quite unnecessary and may seem that you know it's quite trivial and we won't
be using it for anything for as long as we are in a command line tool.
This really helps us understanding the result of our application.
So if we run a piece of code we can see the result of it by printing success or failure or if you're
searching for something in printed value by knowing you know what kind of results we got for that.
We found that one or not.
Another thing that you must mention I must mention is that up here in the command line tools the app
isn't constantly running.
So the app isn't in a mode that like in Iowa as it is in the wrong time mode.
Here it runs and then it exits which is as it says your program ended with exit code.
It finished you know running is of course trickles right out that it stays continuously waiting for
for instance input from user.
But for now we don't need to do that.
We just need to be able to print some news.
So to keep your recap file new project and now set up an office any kind of application makeovers.
And in your command line tool that's more or less what we'll be using for the most part in this section.
I might jump back into Iowas from time to time but for the most part we'll doing Buddh be doing command
line tools in the command line to remember to keep your language as Objective C for now.
So with that in mind this move on to our next lesson.