Hello.
My name is Arun Nagarajan and I'm
a developer advocate at Google.
Today we'll talk about building iOS apps with Google APIs.
Did you know that Google's one of the top application
developers on the iOS app store?
We build dozens of applications for iPhone
and the iPad that are used by 10s of millions of users.
We also provide a lot APIs and services to iOS developers,
so that you too can build a lot of these amazing experiences
for your users.
We are big believers in reaching users wherever they are
and our tools go beyond Chrome and Android.
In this session, we'll walk through several of these APIs
and services that we provide for iOS developers.
And we'll approach them in terms of the problem
that you as a developer might try to solve
and then talk about the Google API
that we think will help you immensely in that case.
First, let's talk about building your application's backend data
store and logic.
Every great application needs a powerful backend infrastructure
that constantly scales what the application needs.
Your application's backend might perform some operations that
are asynchronous or store some photos
or do push notifications.
There are really a lot of the scenarios
that you can imagine for an application that you may build.
And the nice thing is that Google
has got you covered with a great service
that we call Google Cloud Endpoints.
We can build services on App Engine
and expose them as APIs for your iOS apps.
And the nice thing is that these APIs are also
accessible from Android and web apps,
so you're covered in all fronts.
Here you can see a server logic in Python--
a really straightforward with the client-side API called
below it.
And you can see how the server logic is annotated with the API
semantics and the client-side API
is generated fully on the API spec in the server side.
So it feels very natural and conforming to the API
that you have defined.
Next up, you need to be able to register and sign in new users.
And this is really important for a quality application,
because you want to personalize your application,
store some settings, and be able to restore to the user's state
and you need to know who they are at the keyboard.
And Google+ Sign-in for iOS really lets you solve this very
easily.
Drop in the G+ Sign-in framework and Xcode and you're off
to the races.
The GPP sign-in instance will control the registration
and the login flows.
And once the user is signed in, you
can actually use the API to request
additional information, like their profile,
for instance their picture, or other information
about their social graph itself.
You can even add in additional scopes,
like access to Google Drive or calendar,
so that you can securely interact with those resources
as well.
And all that can be taken care of in one single sign-in
and authorization flow.
Adding Google+ Sign-in improves your apps registration
and sign-in rates quite a bit.
As an example, edjing a DJ app for iOS,
saw an increase of the number of signed in users on the iPhone
by 32% and their iPad app by 42% after adding Google+ Sign-in.
So that's quite a bit of increase there.
And now that you have your users logged in,
you want to be able to provide them
with some pretty immersive experiences.
And the good news is we've got you covered on that front
as well.
So let's talk about Google Maps first.
Google Maps provides high-quality, map imagery,
and information.
You're familiar with that.
And now you can easily embed Google Maps in your app
as well.
You can easily build a great map experience
with your custom location data using Google Maps SDK.
Now here's a small snippet of code and notice
how we are using the GMS map view
and providing it a marker and a camera instance.
And there's some deeper APIs that
go beyond this to add further interactivity
or other additional advanced functionality.
Google Cast enables multiscreen experiences that
lets your users send and control content from a small device,
like a phone or tablet, on a large screen device, like a TV.
So if your app displays video or other visual content that
would look great on a big screen,
we highly encourage you to take advantage of the Cast SDK.
It's really straightforward to implement.
The flow is first, you try to scan for devices.
And once you've registered against a device,
you simply send the media content up to that device.
The device is called a receiver and you can actually
customize the look and feel on the receiver using standard web
technology in case of advanced scenarios.
If you're a game developer, we've got a great SDK for you.
It's called Play Games Services.
You can power up your games with achievements, leaderboards,
real-time multiplayer, and Cloud Save capabilities.
SDK is across platforms, so you're
covered on all platforms.
And the user could start the game on an iOS device
and finish it on a web browser or compete
against another user on an Android form, for instance.
Let's take a look at just one of these features of the Play
Games Services called leaderboards.
And leaderboards can be a fun way
to drive competition amongst your players,
even if they are just casual gamers.
And here's a simple example of how
you use the leaderboard using a GPG leaderboard controller,
which provides a lot of simple APIs
that you can launch and show the leaderboard without having
to do much magic.
There are probably many scenarios
where you want to embed and show YouTube
content in your application.
Some of the content that you may have for help, for instance,
or other instructional information
are really well served by having that on YouTube.
And the YouTube iOS Player Helper
is an open-source library that you can easily
embed into your application and be
able to show off this in a simple iframe.
You can see that the YT player view is a simple library.
And you can see how easy it is to load and control
a video from there.
Let's now talk about how you can make your app get better
with time.
You'll of course want to know how your app is being used--
what the popular sections and the not so popular sections
are.
And you'll want to be able to experiment and change things
on the fly, so that you're not always rebuilding
and resubmitting your application.
Luckily, we have two great tools for that.
First, you're probably familiar with Google Analytics
for websites, but you know that there's also a Google Analytics
SDK for you iOS native app?
Here you can see how you can use that SDK-- really
straightforward to track the analytics of a home screen,
in this example.
And all that, of course, is securely tracked and logged
in the Google Analytics web console.
Another great tool for app developers
is the Google Tag Manager.
Google Tag Manager allows developers
to change configuration values in their app
without having to constantly rebuild and resubmit
their apps.
This is really useful for changing configuration values
and settings in your application, like strings
or various UI settings that you want
to be able to have dynamic control over.
And this sample snippet shows how the Tag containers opened
and how the value can be retrieved using a simple API
call.
Now it's time to talk about how you can generate money
from your application.
If you're app sells physical goods, tickets, or services,
you should really look into Google Wallet.
Google Wallet Instant Buy enables
you to access hundreds of millions
of users that use Google Wallet and can pay via Google Wallet.
And this also minimizes the data entry
that they have to perform.
So this is a really good for everybody involved,
including yourself as the developer.
The two key parts in the sample code
here are the masked Wallet request
that defines all the fields that you
need in order to create an order.
And the second part talks about how once order is authorized,
how you can get the proxy card to send the payment
information to your processor.
Another great way to monetize is by displaying high-quality ads
in your application.
And you can easily do that with the AdMob SDK.
Banner ads use a small portion of the screen
to entice users to click through to a richer
full-screen experience.
And notice in this snippet, we're
creating a GAD banner view and adding
that as a sub-view within your application UI right there.
So, now to recap.
We walked through ten different APIs and services
that Google offers for iOS developers.
As you can see, these APIs help you solve a lot of the problems
that you as a developer might have
regardless of the type of application you're building.
We believe that you could build amazing experiences
with these APIs for your users on iOS.
We've just barely scratched the surface with this APIs.
Feel free to dig in and learn more at developer.google.com.