Thursday 17 October 2024

cErW4wPQJSM

cErW4wPQJSM

now just before I get into the actual
video today I just like to say that an
early access copy of my book for the
first two chapters hello Swift iOS
programming for kids and other beginners
has been released you can find it at the
link in the description I really hope it
helps you along your journey of learning
iOS development through Swift solo there
my name is Tammy Bakshi and this time
we're going to be going over how to
import tool chains into Xcode so let's
begin first of all if you're new to the
concept I'm just going to be explaining
this from scratch so to begin what is
Xcode in the first place most of you
already know this and if you do you can
skip I'll have an annotation on serine
sometime right now ok now it's gone so
if you click on that you would be able
to skip to the mac part where i actually
import tool chains in tax code but
continuing if you're new to this here's
an explanation from scratch of what a
tool chain is what xcode is and what the
languages that we're actually
programming it so let's begin first of
all what is xcode xcode ok xcode is
essentially your AI de now ide stands
for integrated development environment
ok and essentially what you're going to
do here is X cuddle makes it easy for
you to edit your files your dots or
files assuming that Swift is the
language ER programming and however
Xcode does things like code completion
and debug the code for you without
having youtube without you having to use
the command line alright so now
basically that's basically the advantage
of Xcode but one thing what if there are
two different versions of Swift and
instead of installing two different X
codes to run those two different
versions of Swift you could use one
version of xcode but have both versions
of Swift inside of that version of xcode
and you could build in a bug for both
those versions and even have everything
like code completion ready for you to
use in xcode well here's where our tool
chain comes in so let's start
explaining vets now Swift is the it fell
all right so now Swift is the language
that we're programming okay inside of
Xcode eyes you you can also do it in the
command line like Java but it's easier
to do it in Xcode okay so let's just say
Swift over here alright so now as we
know Swift has been open sourced all
right this means the code is available
for everyone to use and this means that
there's a lot of different builds for
swift even version 3 which is very not
even very close to the it's beta release
yet we still have built of it because
it's open source and that means Apple is
free to actually release everything to
the public all right all right so now
Swift right now xcode is in version
seven point three point one okay let's
just write that down so xcode is in
version seven point three dot one now
Swift is in version 2 all right it's in
version 2 however there is a beta for
version 3 or actually a developer build
i guess a developer build / version 3 of
swift alright so now how do we get Swift
three onto an Xcode that was built for
swift to sounds complicated but it's
actually really easy due to a new
feature Apple has an Xcode 7.3 let's
take a look at it all right so basically
what we're going to be doing is Xcode
has a new feature called toolchains
essentially what this allows you to do
is Swift to is just a dot XC toolchain
file all right a dot XC toolchain file
now this contains everything about so if
the core library is the actual runtime
how to do code completion on it
everything alright and then what Xcode
does is it takes this dot XE toolchain
file and you know it's it's coated in a
way for to understand this and
essentially allow you to debug apps do
coke inflation and everything even
syntax highlighting inside of Xcode all
right however what you can do is from
the Swift
or website which is actually where they
release the public builds of Swift you
can actually download the XC toolchain
file of Swift three alright then what
you need to do is actually won't be
downloading the XE toolchain file you'll
be downloading a dot and installer file
which will install an XC toolchain file
into your Xcode and then basically all
you need to do is it's really simple in
xcode 7.2 it was a bit harder but it was
possible through the command line button
at xcode 7.3 they've released a nice
little GUI feature for you to do it and
so now all you need to do is go to xcode
tool chains and then select the one that
you'd like to use huh and so that's what
I'm going to be explaining to you now in
the mac parts so i hope you enjoyed that
little clip but now it's time to get
over some mac part where i'm going to be
explained to you how you can actually
install these tool chains to xcode let's
get to welcome back to the back part and
now i'm going to be showing you how you
can actually import tool chains into
your xcode project or actually xcode ide
in general not just a specific project
so let's begin so to begin you actually
need to have a tool chain to use so i'm
going to be getting mine through swift
dot org so let's get that for so I'm
going to make my face a bit smaller so
it's less of a distraction put that in
the corner there all right now let's
continue let's go over to Swift dork now
this is again where they host sort of
all the downloads the documentation
stuff and I'm going to be downloading
the trunk development snapshot for xcode
so I'm going to click on xcode alright
and so now as you can see this is going
to download so this might take up to
five or ten minutes actually could done
my connection but for you it'll mostly
be five minutes so I guess let's just
speed up the clip now
alright so as you can see it is now done
downloading alright so now as you can
see this package file is done
downloading and if I click on it it
opens up an installer now again one
thing you do have to make sure about and
this is actually really important is
that up here in this little side there
should be this little lock button and if
you click it show this little
certificate this actually proves that
this is actually signed by Apple and
this isn't some sort of third-party fake
something and so yeah this is the actual
real thing and if you have actually
downloaded this from Swift org itself
and you do not see that little lock sign
you should report that to Swift let me
see where that email is um well I mean
that email will be in the description
i'll put that or actually nevermind
that's it right here swift dash
infrastructure at Swift org that's sort
of the email you want to contact and say
as much details with as much detail as
possible what's happening and stuff like
that and so anyway let's continue now
alright so let's just click on the
continue button over here then I'm going
to click on install then i'm going to
type in my password and as you can see
this is going to write files and stuff
and it's going to install the package
and it's done alright so now as you can
see i'm going to click on clothes and
let's open up xcode now alright so I'm
opening up xcode hopefully it doesn't
take too long now as you can see if i go
into about xcode i'm running version 7
dot 3 dot 1 and the build number if
you'd like that for verification
basically that's not supposed to happen
let's just all right so now let's just
quit and reopen that you won't have to
do that step that's just I have to do it
us now as you can see Xcode is now okay
so now let's just click on file new
project now again playgrounds are not
completely supported with these sorts of
snapshot builds and I have not yet
enabled that snapshot build I'm still
running Swift to all right so if dot so
let's see the current latest version is
so I've got to Swift 221 so I'm running
Swift to not to that one right now and
I'm going to create a command line tool
and I'm going to call this a hello world
lowercase alright sounds weird but I'll
tell you what this means alright so now
I'm going to go into mein Gott Swift and
as you can see it says print hello world
here however what I'm going to do is I'm
going to say print hello world dot
lowercase can the auto-complete thing
work here lowercase string hey lowercase
string all rights now if I were to
remove lowercase string which is
actually very self-explanatory all it
really does is it just makes hello world
all lowercase all right but if I do run
this without putting that in as you can
see it gives us hello world however if I
do put in dot lowercase string and if i
click on debug then as you can see
lowered hello world is a lowercase
string however now what I'm going to do
is I'm going to close Xcode not quit and
then I'm going to click on this little
Xcode menu here then click on tool
chains alright then as you can see there
are actually quite a few little options
here so I'm going to click on Swift
development snapshot 2016 0509 which is
the current bill that i just downloaded
and click on it alright so now as you
can see i'm going to click on quickly
open and this will essentially change
our tool chain in xcode now we can use
Swift 3 that little developer snapshot
there
right so now let's go back into Xcode
and let's open that file backup so we're
going to open it manually unfortunately
hello world lower case and open up the
Xcode project sounds you can see we have
this lower key string here but if I try
to run it what's this I have an error
lowercase train has been renamed to
lower cased and as you can see we're now
running Swift 3 so in so 3 a change is
basically lower instead of lowercase
string we have lower cased and as a
function all rights now if I run this
again it should give us the same old
output right over here in this little
debug area let's take a look at it and
wait for it so as you can see any second
now hello world lower cased and if I
would remove dot lower cased we are
going to see hello world in some caps uh
and that was it for this video today i
hope you enjoyed if you did please make
sure to LIKE the video and share of
course you might even want to consider
subscribing to my youtube channel it
really does help out a lot if you do
like my contents and yeah if you have
any questions you can email me at Taji
mini gmail com you can even tweet at me
ask tad you Manny and you can also write
a comment down below on this video
that's gonna be up for this tutorial
today I hope you enjoyed goodbye

No comments:

Post a Comment

PineConnector TradingView Automation MetaTrader 4 Setup Guide

what's up Traders I'm Kevin Hart and in today's video I'm going to be showing you how to install Pine connecto...