>> On this week Xamarin show,
I'm going to show you how to wirelessly deploy to
your iOS device from Mac or PC.
[MUSIC].
>> Welcome back everyone to The Xamarin Show.
I'm your host, James Montemagno,
and today I'm going to show you how to wirelessly deploy
to your iOS device from your Mac or PC.
Now, this is really cool because traditionally,
you'd have to come over to your Mac,
plug-in all these cables,
and then your iOS device would show up inside of
Visual Studio for Mac or Visual Studio 2017 on your PC.
So, I'll just kind of everything's on the same network.
Now, what's unique is that Apple enabled a new functionality to
enable iOS devices and Apple TV devices, in fact,
all their devices to be able to connect to the Mac over Wi-Fi,
and then we enabled it so you could debug
to that device once paired over Wi-Fi.
So, that means you can just rip
the cables and you'll be done forever.
But first, we're going to have to plug it in.
So, let's take a look at what it looks like on
a traditional normal day without enabling any of this,
and then we'll enable Wi-Fi.
So, let's head over to the Mac.
Now, here I am inside of Visual Studio for Mac
and have an iOS and Android project and we can go and zoom in
here and see in my debug I have
all my iOS simulators and then my iPhone device.
We see a little iPhone device here and find an iPad or
an Apple TV that was plugged in via USB, I would be good to go.
Now, the problem here is that you have to keep
plugging the device in over and over and over again,
and sometimes you just want to deploy to what's in your hand
today or be able to easily swap in and out,
or in the case of me, with my Macbook Adorable,
I only have one USB port.
So, let's enable Wi-Fi debugging.
So, what we're going to do first is actually
close down Visual Studio for Mac because
the first step is to enable
debug mode for this iPhone inside of Xcode.
So, we're going to launch Xcode,
and I'm going to go to Window,
and then here we're going to see Devices and Simulators.
This is a one-stop shop to see what's installed on your device,
pair devices to your physical iPhone device,
and get unique identifiers or serial numbers.
Now, when you plug this in,
Xcode will provision your device,
but also you'll see a new option say, "Connect via network."
All you have to do just once and say, "Connect via network."
It's literally that easy.
So, now what I'm going to do
over here is we're going to go ahead and
take this device and unplug it. That's it, it's gone.
So, let's head back over to the Mac and see what
happened now that I've actually ripped that cable out.
Now notice that I'm still here inside of
the device manager but my iPhone has this little network device.
This is because I'm on the same network.
You could have your Mac or PC wired
or you can be on the same Wi-Fi, like I am here.
Now, I see everything exactly the same but it's here.
That means that if I come now back over
into Visual Studio for Mac,
when I zoom in,
we will see down here that I see my device iPhone,
we've added a little Wi-Fi symbol there.
So, that means now I can select
that iPhone device and simply hit
"Debug" As long as I am provisioned, I'm good to go.
I am now wirelessly debugging over Wi-Fi.
So, now, what's cool is that I can
go beyond the Mac and I can head over to my Windows PC,
inside of Visual Studio 2017 and get the same exact experience.
So, let's head over there.
So, here I am inside of Visual Studio 2017.
Now, what's cool here, of course, is I
have "Debug, iPhone, iPhoneSimulator",
and it with iPhone selected,
here it is, "iPhone connected via network."
Now, the name of my iPhone is iPhone but it would show
any of your name that you have for your device.
You can, of course, see all of
your other simulators or other devices connected via network,
and this is because I'm connected via the pair process.
So, you still have to enable that,
but once all of your devices are
paired and on the same network, you're good to go.
All your devices are done. That's it's.
It's literally that simple to get
started over Wi-Fi debugging to your iOS device.
This is super important because
the latest generation of Apple TVs actually have
no USB output you have to actually do this always over Wi-Fi.
So, there you have it, super simple.
I hope that you enjoy this and now you can
start a Wi-Fi debugging all the
time for your iOS devices. So, that's going to do it.
I will put links to
our documentation in case you stumble into any issues but,
of course feel, free to contact me on Twitter @JamesMontemagno.
So, until next time,
this has been The Xamarin show,
I'm James and thanks for watching.
[MUSIC]