How is everyone feeling ? how is everyone feeling? Okay, i need more coffee too.
I’m here to talk to you about How xamarin is the absolute best way to build klos platform Native applications across my platform.
Ios, microsoft, mac, wearables, it doesn’t matter, we Are here for pup i will give you one on one overview of what Xamarin is, how it works and how we are enabling it to be more Productive than ever with some of the brand-new tools.
Ones i’ve been working on and amazing new library possess p at The same time i will walk you through the day in the life After developer starting with the first application and using Our tools built individual studio.
Now if you don’t know who i am, i’m a principal program manager Here at microsoft, i’m james montemagno.
I moved to seattle seven years ago.
I joined xamarin because i fell in love with it four years ago.
And we joined Microsoft.
And i love it because it is the Best way to build a single app, two apps or old apps for every Single platform.
If you love hearing me talk I Have a podcast and a show.
I have lots of stickers and Stuff in the podcast area.
We will get more tomorrow.
We ran out today.
Dot net itself is a platform that You can build for absolutely any single platform.
Whether it is web, desktop or mobile.
We are able to not only craft native applications but share Code across all of them.
This is what i fell in love with As a developer and what i found i could write android and ios apps.
That’s all i ever wanted do.
When i talk about native Applications i want to make sure everyone knows what that means And why i fell in love with xamarin and i think you will too.
For me it is about creating a beautiful native user interface.
I want to craft beautiful android experiences, ios, Windows an mac experiences.
There is a reason that someone Buys an ios or android device.
They like the hardware but love The software.
I like apple hardware.
I don’t like the operating system.
That’s why i’m an android System.
As a developer, i want access to Every single feature in the platform.
Gnats wh is important.
That’s what is important.
I shouldn’t be limited because i’m picking cross platform Technology.
And additionally, apps have to Be super permant and get access to all of the underlying Performance enhancements that apple, google and microsoft are Making.
Now for xamarin we have a shared Business logic.
Models, view models, service Calls, sql ipt gracings, azure integrations, things that are on Code because we created amazing run time that runs on ios and Man droid and mac even though it is not up there.
There are apis and access to native user interfaces.
How it works under the hood, if you are a windows developer like I was, and we all did it, let’s be honest, good fun, we had Access to dot net.
This amazing library of Goodness.
Like link, xml, core, things we Love as developers.
If i want to go to Asp.
Net or dominant sck and dominant In as your platform, all of that goodness In the bottom in gray and the goodness in android.
Bindings every android and ios.
Android support libraries, everything.
If there is something an Objective swift or job developers could did, can you do It inside a studio with c sharp.
More importantly can you target All of the platforms that ios and apple and google and android Target. Create An App Without Coding Skills
Such as watch os, wear os, Anything and share code across all of them.
Since dot net is a unified platform we can have standard Libraries to take a single assembly with vast api surface Of dot net and share it across all of our applications.
Whether that’s a huge chunk or small library and use a favorite Tool such as visual studio or mac or code or even just the Comad line.
When we go into building Applications, there is a lot that goes into it.
When i started with xamarin, what i think is great for Consumer apps, super high-performance and access to Every ui bit is the xamarin traditional ui approach.
You create that shared business logic layer but this this Instance, you create ios story boards, inside of visual studio For ios, xml for window owes, xaml and iwp.
There is every single interface and every single api because you Have those three projects and a shared code project.
10 Excellent Platforms for Building Mobile Apps
For a lot of applications, you understand even more code.
That’s why we created a native interface we call xamarin forms.
We said, hey, ios, windows, similarities.
There are labels and list views.
A common library that any Developer can bring in and write some xml or c sharp to mark off Their user interface.
The unique part is this is on Top of xamarin and creating interfaces for each platform.
You create a button and there is still a button, width et button Platform.
Can you easily bring a xamarin Page into a xamarin app for custom controls into your Xamarin performs app.
This is the model i fell in love with.
I fell in love with both of them to be honest because they each Have their own use cases.
But i felt in love with the fact I could write a bulk of my lodge ek.
But often we don’t talk about this stuff.
Purple, green and blue boxes.
What is in that stuff? It talks about apis that we expose.
The interesting part we discover Said just like ui elements.
There is a lot of common apis Windows.
There is compass and key store and a lot more.
I have access to every nc sharp but ios android and windows Have vastly different apis to do this.
So why do developers take the apis, create an interface, Afer and over again.
So we said, what if you don’t have to did that.
What if you want to save settings in your applications And preference answers have you api such as get and set.
That’s your api for mobile.
You don’t have to worry about Ios and ns user defaults or share app data.
We will take care of that for you.
We created that, and it is a single library we released this Week called xamarin essentials.
Over 26apis that live inside Single nugget package to do things juch as dwoo gee request Location, geo coding, key store access, settings, excel romter, Gyroscope and a lot more.
We will continue to expand this.
It is all open source.
You can tell us what you want to See in it.
So i figure with the time i have Left i will build an entire compass application for ios And android inside a visual studio.
So what i’m going to do over here is i’m first going to go into the documentation.
When you go to docs.
Microsoft mountain com, there is exam rin.
You are brought directly into our documentation.
So for getting started, xamarin essentials, boom, there it is.
Also android, ios, mac and crass platform information.
We have game engines antons of tools to learn about right here.
Inside of here i have access to documentation for every single Api.
Data transferred pb device info.
Mag ne nomter.
Which i can’t pronounce.
One single api and we access the native things for you.
Let’s look at compass.
I go into compass.
It is hey, you need to bring in the nugget package.
Sure is how you use it.
Start and stop.
Get an event.
Here is a sample code.
You can come down.
Api or go directly to the source Code which we didn’t link correctly apparently or go to Source code.
Go into essentials.
Everything is here a hundred percent on github.
So let’s build this out.
I’m in individual studio.
I created a blah blank application.
Under file, new project.
I create a blank xamarin forms Application for ios and android.
I just did it to save myself about 30 seconds here.
And i will show you the project structure in the right happened side.
In form dependency and main page.
Xaml And i call it my compass.
It is important i have my ios project.
That’s where ios specific things go.
Or specific apis.
For instance in the main Activity can i see a bunch of information about android setup And loading my initial app.
And is it anything fancy? Disamin forms.
So i will hit browse.
And type in xamarin essentials.
Now i just released this this week.
And if any internet and nugget is working which it was five Seconds ago.
Let’s open a new nugget.
There we go.
Now it seems to be working.
There it is.
Make Your Own App With Android Maker Builder
I’m going to install it into all three of my projects.
Dot net standard and android and ios.
In android and ios, that’s where the actual api lives.
I will hit install.
And go ahead and accept whatever We said.
I don’t know.
Never read that.
But you should probably read that.
So now this is going to install The nugget package and any dependencies it may have into my project.
For this api, if there is no additional setup, for some Android, implementations, you may need to add permissions and We handle permissions for you.
But i’ve read the docs and it Said hey, go do this, no additional setup required.
For the app, i go to the main page.
For the label we update it in the code behind.
I only got a few minutes.
So we will say, label info.
Creating an x name which will expose that in the code buying for me.
So the main page.
Come in here.
I will zoom in.
And i can immediately come in And say, xamarin.
Eye he is not cials dot.
And there is every single api Available to me right inside of this api.
So everything is there.
You are probably thinking, wow, Everything will be so big if he has a compass.
We will remove any api from our library that you don’t use.
If you use one, that’s the openly thing included inside of Your app.
So what i will do now is come up and say using xamarin Essentials.
Now from the docs i just read, i Can say, compass.
Reading changed plus equals and bring in an event.
And in this event i get a compass changed event so i will Say label info.
And i will do some string Interpretation and say heading e.
That’s wh we are exposing in this api.
I close that off and i’m good.
Last thing i need to do is equal sign.
Thank you very much.
Is go ahead, parrot coding.
I love that.
Now this is going to take in a censor speed.
So if you are making a game, you can have game or fastest.
This is user interface application.
So i will go into ui.
And hit okay.
Three lines of code.
I will pit debug on my android Application.
I have an android device i’m Screen marrying here.
This is calibrated.
This will compile my android information fully and deploy it On to my galaxy device.
So this will take a few seconds As it redeploys an compiles up.
Give it a few seconds here.
Right on time.
And as i’m letting that compiling deploy, we can come Back into the essentials api and great getting started doc.
We will tell what you to support today.
How To Create An Android App Without Any Coding Skills?
How to get started.
What nuggets you need to install And here i can actually note that there is a little bit of Android setup that’s needed if permissions are required.
Luckily for compass, no permissions are required spop That’s nifty for this demo.
That craft and myself.
So we will see at starting android app into debug.
There we go.
Heading on the screen and as i rotate my device, it is going to Take my accel romter and update my heading and to where i’m Pointing and immediately inside the application.
With that i have my reading and few lines of code.
You are like, wow, whoa james.
Take it a bit further.
And how about images and compass so inside my app i have a bunch Of resources.
So i’ve gone ahead and made Beautiful compass artwork that i’m going to drag and drop into Both ios first.
And we can see that i have an Arrow.
2X and 3x and compass.
And inside of these drawable Folders are a bunch of icons From my android app.
So i will drag and drop those Resources into visual studio.
Now this is going to associate Those as android specific resources inside the Application.
And then xamarin forms can go Ahead and point at them.
So you can see i’ve gone ahead And created different sizes of them for the application.
So know i can come back into my xaml and since i have five Minutes left i will copy xaml.
I can cheat here a little bit.
Paste it in.
20 Lines is xaml.
I have a grid.
And the first thing i do is i Set a compass image in my background.
North, east, south, west.
Then i have an arrow.
Which is pointing here.
I have exposed with image arrow.
And label info.
Which i have previously just for good measure.
So now i can come back into my code behind.
And here i can go ahead and say image arrow.
Now it is nice is i take rotate xamarin forms also has native Nations built in.
Can i maint this over time.
X, y or directly to it.
I’m just going to set it directly to the rotation so Whatever the heading is.
There we go.
Now i have images, i have an arrow, a background, and i’m still using the same exact Compass api and update the actual image on the device.
So again now it is compiled once so it should compile faster this Time and deploy over to the device.
And at the same time, i was creating my package and removing Anything that i don’t intoed.
So it is only about one api.
Here we go.
Good, good, good.
Sieping, signing, signing, signing.
And what i will do is make sure That actual device is here.
Here we go.
And as you can see, i am an absolutely beautiful android or Artist here actually make mig compass application work perfect as i rotate around.
Now the reading events are coming in slower because it is a Ui.
And ui based.
And we have documented what that members for each application.
North or west here.
Now what is really nice about Xamarin forms, xamarin and xamarin essentials is i can put The same exact application in ios.
Notice i did add resources to Ios.
And all i have do simply say set That as my startup project.
Now i do have a mac book Adorable sitting right here which i’m connected to over the Local wifi.
There is the local ip address.
I’m connected over shh.
When i set this up it connected Our new auto mac provisioning ensured that the app could be Provision but all of the build tools on my mac are installed And up-to-date.
So installing xamarin and everything.
This ios device is plugged into hdmi.
No other cables.
Just screen mir popper we have Implemented wifi deploying into visual studio and visual studio For mac.
Here i set it as iphone build.
And i see iphone connected via network.
So what i’m able to go is go ahead and deploy the application Directly over wifi to the device.
Which i’ve never done on-stage here.
So we will see what happens.
And it is going to be fun for everyone involved.
At the same time, i’m going to good ahead and pull up my Streaming card.
So we can actually see it here.
There we go.
That looks good.
We don’t need it right now so let it go.
So what this is doing is it is Taking all of my source and taking it over to my mac to Fully compile the application.
I want to see it on the hardware To get the hardware sensors.
What it is doing is compiling it Fully.
When it is done compiling, it Will send all of the bits needed and signed over to my ios Device over wifi.
This normally takes around 30 to 90 Seconds based on hu my wifi is working and how much my Adorable mac book is doing.
It is over here.
Additionally i still have the Ability to come in and add additional references, access ios code.
And additional provisioning information that i may need.
So it did build.
I totally am connected, i swear.
Let’s disconnect and reconnect to make sure it is doing it.
This is the experience actually.
This is the up with thing i was Like, oh, so close.
I had wifi issues yesterday too.
We will see if it will pair and connect on the additional wifi In my last few seconds.
Interesting it still picked it Up, though.
Give it a second here.
Yeah be question? snz.
[ Indiscernible ] >> That’s good question.
I will ask it very Generically.
This is community effort.
The nice thing is they add on to it.
I will talk p b some of my Projects.
I have replaced some of my own Plug-ins with xamarin essentials.
I encourage you to check it out and start replacing.
It doesn’t mean they gol away as plug-ins for xamarin may add Additional features that essentials may not have.
Billing, that we have a plug-in that i wrote.
Probably not in essentials because it is very complex.
I’m not sure it will deploy or debug because of my wifi.
But we do have a cool xamarin essentials sample application.
Which is pretty slick.
Which shows off every single api Inside of here.
And it does have a compass.
Can i cheat a little bit and start it on to the device and i Can actually — no, it wants me to cal grate.
I can see it come in and update The number if realtime.
Even though my wifi deploy on The beautiful conference wifi doesn’t want to work.
What is nice here is that yeah, we have preferences and key store access.
Can you download this and start checking them all out and Integrate them into your own app right now.
Let’s see if i can get out of here.
Oh, it is totally deploying.
Oh, my goodness.
I’m going three minutes over.
Feels like it is happening.
Look at this.
Going so fast.
Look at it go.
That’s the entire application in Debug mode.
And sending it over.
At the same time, also signing My application with automatic provisioning which is really cool.
So everyone hang in there for the 60 seconds.
Is anyone after me? >> yes.
Oh, my goodness.
It is all happening.
It is verify pg p it is doing it.
It totally installed on device.
Whoever is after me is so upset Right now.
I see it.
It usually just deployes.
Yay! Plaws plus that’s real smooth.
So we will get out of here.
I’m running off the stage.
You just have to ne there is awesome stuff that i talked About here today for android, ios.
All available in visual studio.
Here is all of the links.
Take a snippet of that.
If you have any questions, visit our contact us page.
I will be out for a pod cast but i’ll be back tomorrow for an.