In this lecture we're going to take our dancing granny our app and build it out to an Iowa device.
So make sure that your tablet or your phone is plugged into your computer and that you have it unlocked.
That's the first important step.
Next what we need to do is switch the platform.
I've already switched the platform here.
When you do that it does take a little bit of time.
So we want to go up to file build settings and then undo the.
You want to switch to the platform you want which is Iowas and then click on the switch platform.
It's then going to rake Paul and rebuild a few things for you.
The other thing Walwa in this window is that the saying you want to build out needs to be up in the
scenes in build section right at the top here.
So my saying I've named Granny.
And you can see that it isn't here to get it up here.
It's quite easy to just drag and drop it from the project window and put it in.
Mike Schwartz ticked so that it will be built.
Ouch.
Now once that has happened the other things you need to do is go into place settings in place settings.
You want to have a name for your app product name here.
This will be the name that appears under the little icon that is on your device.
The company name is not so important that you could fill it in.
Now the other things you need to do is to add in your bundle I.D. which is here and your signing team
ID which you can see here as well.
They are the values that you put into your developer account at Apple.
So this is the apple a day that you generated and this is your team I.D. that it would have given you
before and you should have used these when you did the first example of building out the device earlier
on.
Now another thing in the settings that will have to be changed is down here to camera usage description
because the experience needs to use your device camera.
And if you've ever used an app before that requires the camera you usually get a little pop up and it
says you know allow use of your camera.
OK.
And so in this case you need to put something in here a message that will display in that little pop
up to the user so that they can first of all allow the camera to be used if you leave this string out.
It won't build it in and you'll actually get an error when you try and run your app.
Now at this point I assume you've got your bundle I.D. and you've gone to it could shoot and got your
license I.D. If you haven't.
Don't worry.
This is still going to work for you but you still have to have a legitimate bond law a day from your
apple developer account the place where you put your license key in from we could shoot it in the camera.
So if we click on the camera right at the top you can see we could you license key where you should
enter your license key that license key is linked to your bundle I.D..
So those two things have to match.
If you have a different license key in here that doesn't work you will get an app on your phone or your
mobile device that does work but it will have a watermark all over saying mismatched date but it will
still work and you still can test and use your eye even if you don't have your license key.
Yet from we captured so with all of that set up you can click on build and run.
It'll ask you where you want to save you'll build files too.
I usually put them in my project folder.
I've never had a problem with putting in nets outside of the assets folder so it doesn't cause any issues.
I'm going to call this Eilis build and then just click on Save what it's going to do.
Then if you already built this before I will ask you if you want to replace it.
So I just hit replace and then it's going to go through a whole bunch of build stuff and then eventually
X code will open.
Now once it does it's going to go through a whole bunch of compiling and everything you'll see the messages
up here.
Warnings will appear on the side which is ok don't worry about those.
Make sure that at the top he you've got your device showing up here and it doesn't say generic.
Again make sure that your device is actually plugged in and unlocked so that it can build out to it.
Now the point that it says running the app on the phone.
It's not yet time to rejoice.
Going to try and run it on the phone and you might see the screen on your phone change color.
But we've now got an error.
If anything happens during the running compiling that's going to be a problem.
You'll see it down in this window here.
Now what it's telling me is that I've got a library that hasn't been loaded which is the wicked chewed
library.
If you have also forgotten to put that use camera in back in unity you will get an error down here about
the camera not being available.
So it will just remind you that the two main areas that you might get now to fix this framework problem
you need to click on the folder.
Hiya over in the corner.
Click on the iPhone unity iPhone at the top or iPad or whatever you've got at the top.
Click on general and then we're going to go down through this list down down down until we find imbedded
binary.
Click on Add.
And then in this list you will find that we could choose libraries here.
So just click on that and go ad that will.
And then we could shoot STK framework and that will get rid of this era that you've had before.
Right now to really run this on the device you don't have to go back to unity and go through the prices
just hit the play button at the top here.
Stop what's currently going on.
And then we'll link and build out and then if everything is OK the app will start to run on your phone.
The first time your app runs you'll see that it comes up with the Kemmerer access message so just click
OK for that because it does need to use the camera.
Then try and find your Mocca with your camera and your granny will have built out and be visible on
your device.
So that's the process for building out to Iowas make sure that you will get your license and your bundled
idea in there that you have your camera usage script written in that spot and that you've also added
that we could choose framework when you go into X code and you should have success building out to your
device.
Again if you do have issues make sure that you've put the latest version of all the different pieces
of software A.D case that you require.
And if you do get an error in X code that you've not seen before then just try googling it.
I find that that is really helpful if you can get some details out of there because everyone's computers
are set up differently and we all end up with strange errors and things that conflict from time to time.
But the wicked shrewd framework one is the most important for you to include this time around.
OK so have fun playing around with that.