>> Welcome back, everyone, to
The Xamarin Show,
Snack Pack edition.
I'm your host, James Montemagno,
and today we're going to take
a look at how you can configure
your iOS and Android
architecture types
when you go to ship
it to the App Store.
Maybe you would be
wondering why is setting up
architecture types
really important
for iOS and Android apps?
And that's a great question,
and I'm glad that you asked.
And that's because
different iOS and
Android devices essentially have
different chipsets that run
on different architecture types.
Some are x86 based,
some are ARM based,
some are ARM 64 based,
and based on the architecture
types that you ship to
the App Store will determine
what devices your
application can run on.
Google Play will automatically
filter based on this,
and same with iOS
in the App Store.
So it's really important, and it
also will impact
your overall app size.
So you want to pay pretty
close attention to
this when you go
to ship it to the App Store
for the very first time.
So let's head over to
Visual Studio 2017,
to take a look at
how to set this up.
So here we are inside
a Visual Studio,
and I have created
a brand new project.
This can be Xamarin
or Xamarin Forms,
both are the same setup.
Here I have my android
and iOS app,
and all I've done
on both of them
is right click on the project,
and I went to "Properties".
Let's first start with Android,
because there's
more configurations there.
Under Android options,
we're going to see all of
our Android options for
packaging up our application.
What's really important is
to make sure that you have
the configuration set for
your App Store release,
so in my case, release.
You may also want to change
the architecture types for
your debug configuration,
if you're debugging on
different devices or emulators.
So select "Release".
If we scroll down
a little bit on the page,
we'll see all of
our Linker options and
we'll see additional encodings,
and we'll see "Advanced",
and that's what
we'll want to tap on.
When we go into "Advanced",
this is the main area
supported architectures,
and out of the box we
select to ARM V seven A.
This is where the bulk of
devices for Android exist today.
You may be wondering
why don't I select
ARM normal or this ARM 64.
Well, there's a backwards
compatibility layer.
Essentially, think of
it that if it is ARM
six can only run ARM six,
but an ARM V seven
can also run ARM six.
And here, an ARM 64,
could run ARM V seven A.
So essentially, if I
select just ARM V seven A,
that means that it will support
any ARM V seven
and above devices,
and it will also
be optimized for
the ARM V seven
architecture type.
I usually select the ARM
seven A and X 86.
That will give you
the greatest coverage
for any ARM V seven,
ARM V eight or above devices and
any X 86 devices that are there.
One thing to pay close attention
to that is starting in 2019,
Google is going to
start requiring that you
also ship a 64 bit version
of your application.
So that means inside
of here I also have to
select the ARM 64 V eight A.
It's really important
you take a look at
the Google Play
developer console to
see what types of
devices are being used
in your application.
The one thing that you
don't want to do is just
select all of them
out of the box.
Make sure that you
are smart about
the architectures that you're
supporting when you ship,
so it doesn't increase
your app size too much,
and to make sure that you hit
the requirements for
both Google Play and Apple.
So let's take a look
at our iOS application.
Over here, an app.IOS in
my property grid under "Build".
This is the main area
for application.
Under iOS.build, I've selected
my release an iPhone
configuration.
You want to make
sure that you select
the correct configuration,
just like we did for Android.
Now, we'll see
our Linker behavior and
supported architecture.
If you create
a brand new project,
you may only see ARM 64,
and that is because
if we open up
our info P list file that
describes our application,
we'll see that the deployment
target is version 11.2,
and all devices
running 11 and above
are ARM 64 so it makes
your choice really easy.
But if you want to
support older versions,
we'll go ahead and change
the deployment target here.
We toggle back over into
our project settings,
we'll now see a long list
of different ARM
architectures to support.
And specifically, Apple
requires that we ship
a 64 bit version so we'll have
to set a configuration
for either ARM V seven,
ARM V seven S plus
an ARM 64 build.
I usually do ARM V
seven and ARM 64.
That gives me the
widest coverage on iOS.
And just like that, when I
ship my app to the App Store,
l will ensure that I am shipping
an application that supports
older and newer devices,
and have optimized my bundle
for both iOS and Android.
So there you have it.
In just a few minutes,
we've configured our iOS and
Android application
to ship it to
the App Store by selecting
the architectures of devices
that we care about most.
Well, that's it for this episode
of The Xamarin show.
Make sure that you subscribe.
It's up over there,
down over there.
Ding the bell and
make sure you get
the latest updates
right in your inbox.
Until next time, I'm
James Montemagno, and
thanks for watching.
