次の方法で共有


Part 1 of 5: Introduction to Consuming Azure Mobile Services from iOS


Introduction

001

  1. This series shows you how to use Windows Azure Mobile Services to leverage data in an iOS application.
  2. This means you can use these techniques for iPhone and iPads. And with minimal adjustments, they could be made to work with MacOS, Android, or any app capable of http.
  3. We will create a new mobile service, integrate the mobile service with an iOS app, and then use Microsoft SQL Server Management Studio to control the data the iOS application can consume.
  4. More importantly, Mobile Services enables you to accomplish these tasks within minutes.
  5. Mobile Services allows you add a cloud backend to your Windows 8 Store app in minutes. It is also very useful for iOS and Android developers to get started right away consuming JSON-formatted data through http.
  6. Direct Support for iPhone, Windows Phone & Android is coming soon but I will show you how you can use iOS today, or any other type of client.
  7. I want to show you the under the hood view of web is being abstracted away by the Microsoft tooling. Don't get me wrong, the abstractions are great, but it always helps to look under the hood.
    1. We will use a proxy sniffing tool (Fiddler) to truly understand what is happening under the hood.
  8. Windows Azure Mobile Services (WAMS) is a preview offering that offers a set of cloud services designed to jump start mobile application development.
  9. What I will not cover here today, is the features of Push Notifications and Authentication.

Previous Posts

Part 1 of 5: Introduction to Consuming Azure Mobile Services from iOS https://blogs.msdn.com/b/brunoterkaly/archive/2012/09/26/part-1-of-5-introduction-to-consuming-azure-mobile-services-from-ios.aspx
Part 2 of 5: Introduction to Consuming Azure Mobile Services from iOS https://blogs.msdn.com/b/brunoterkaly/archive/2012/09/26/part-2-of-5-introduction-to-consuming-azure-mobile-services-from-ios.aspx
Part 3 of 5: Introduction to Consuming Azure Mobile Services from iOS https://blogs.msdn.com/b/brunoterkaly/archive/2012/09/26/part-3-of-5-introduction-to-consuming-azure-mobile-services-from-ios.aspx
Part 4 of 5: Introduction to Consuming Azure Mobile Services from iOS https://blogs.msdn.com/b/brunoterkaly/archive/2012/09/26/part-4-of-5-introduction-to-consuming-azure-mobile-services-from-ios.aspx
Part 5 of 5: Introduction to Consuming Azure Mobile Services from iOS https://blogs.msdn.com/b/brunoterkaly/archive/2012/09/26/part-5-of-5-introduction-to-consuming-azure-mobile-services-from-ios.aspx
Source Code MobileServicesClient
Download a Free Trial https://www.microsoft.com/click/services/Redirect2.ashx?CR_CC=200114759

This is the goal

002

  1. Notice that data is visible.
  2. This data comes from the Windows Azure Mobile Service.
  3. This is what we are going to build
    • There is work to do at the Windows Azure Portal
    • There is code to add to the iOS application that we build with Xcode

You will need a trial account for Windows Azure

003

  1. Please sign up for it here:

Assumption: You've signed up for a free trial account for Windows Azure

004

  1. The assumption is that you've signed up for a free trial account.
  2. Download the free trial
  3. Once you've signed up, getting to Windows Azure Mobile Services (WAMS) could be more clear.
  4. I start by clicking on BILLING.

Accessing Preview Features

005

  1. Since Azure Mobile Services is in preview mode currently, click on PREVIEW FEATURES.

Drilling into Mobile Services

006

  1. Click on MANAGE.
  2. This is where we begin creating our Mobile Services project.

Creating a mobile service

007

  1. When you click on CREATE A NEW APP and follow through with the ensuing wizard, the following will occur:
    • A SQL Database will be created
    • A web service will be created with a URL that you define
    • A sample Windows 8 application will get generated
      • We will ignore the sample application and create an iOS application instead

How to Create a backend service for your iOS Application

008

  1. There is a caveat, though.
    • Our iOS app will not end up in the Windows Store. That should not come as a surprise.

Specifying the URL that our iOS app will use

009

  1. This is the URL that will be used by mobile clients to access the mobile service
    • Windows 8, iOS (or any REST-enabled client using http)
    • BrunoToDoService will be in the url used by iOS clients.
  2. We can create a new database or use an existing one.
    • We are creating a new SQL Database. You could use an existing one if you like.
  3. Currently, only the EAST is available for the region.

Specifying the name of the database

010

  1. This database is automatically used by the service we just created
  2. We will specify a new server to place the new database in.
  3. You could create a new server as well.

Advanced Settings

011

  1. You can choose alternate sizes for the database
    • You can go up to 150gb
    • That is the business edition

All your hard work results in this

012

  1. The mobile service has been created
  2. It takes less than a minute.
  3. When the service is created, it is automatically bound to your previously created database.
  4. Next steps will be to start adding data to our database.

Coming next…
How to connect to add records to a database. We will also add a new iOS client.