How to: Use the Sample iPhone Application in the Windows Azure Toolkit for iOS

Author: Ralph Squillace

Reviewer: Scott Densmore

This topic describes how to download, build, and run the sample storage client application in the Windows Azure Toolkit for iOS. The project loads and runs in Apple Xcode 4.1 (installable here) using the iPhone 4.3 Simulator; it does not describe how to install the sample application on an iPhone. (For more information on installing applications during development, see Creating and Downloading Development Provisioning Profiles.) Lastly, this topic describes cloning a git repository from, but does not describe GitHub, nor its use (The topic also describes how to get the application without using git). For more information on using git and GitHub with Apple computers, see Introducing GitHub for Mac.

This topic assumes that you have already downloaded and are running XCode. This topic uses Xcode 4.1; a new topic using a more current version will appear shortly. (Because of the differences between versions, please note which version you are going to use and adjust the instructions accordingly if documentation for your version isn’t yet available.)

Сведения о среде Xcode 4.1

Building and Running the iPhone Sample Application in Xcode 4.1

  1. To get the sample application with the toolkit, navigate to to read the GitHub project page. You then have two choices: You can download the .zip file, uncompress it, and then use the files within; or you can use git to clone the project (copy the tree locally) and use the files from the cloned tree.

    1. To download the .zip file and unzip it, click, uncompress the folder structure, and place the files in a location that is easily accessible location. It might look like this:

      Представление папки разархивированной ветви GitHub.
    2. To use some installation of git to clone the Windows Azure Toolkit for iOS project with either of the following URLs and place the file in a location that is easily accessible location:

      1. git://


    3. Place the cloned branch in a location that is easily accessible. It might look like this:

      Представление папки клонированной ветви GitHub.
  2. However you acquired the toolkit, the next step is to locate the samples folder. The current project has a docs folder, a library folder, and a samples folder, along with a file that is the same as that displayed at the GitHub project location. Locate and browse the samples folder, looking for the watoolkitios-samples.xcodeproj Xcode project file. Open the file using Xcode.

    Представление папки клонированной ветви GitHub.

    The default view of the project might look like the following:

    Представление папки образца приложения iOS.
  3. Important: Note that the default project might be watoolkitios-lib instead of watoolkitios-samples. Make sure that the build is watoolkitios-samples and the target type of the sample application is iPhone 4.3 Simulator (or whatever your target iPhone platform version is), as the following screenshot indicates more clearly:

    Подходящий целевой тип сборки.
  4. If you build and run, you should see the emulator appear. It should look like the following.

    Первый запуск приложения.
  5. Update the ToolKitConfig information in the project to use the Direct connection type and to have the DirectAccessKey and AccountName of the Windows Azure storage account.

    1. Select the project name in the left hand pane, and in the right hand pane, select the Info tab.

    2. Expand the ToolKitConfig entry to see the Direct entry, like so:

      Задание значений ToolkitConfig.
    3. Enter the DirectAccessKey and AccountName values from your Windows Azure storage account. (To find your account information to run the application, see How to View, Copy, and Regenerate Access Keys for a Windows Azure Storage Account.)

    4. Set the ConnectionType value to “Direct”. The following graphic illustrates these settings.

      Задание значений ToolkitConfig.
  6. Press Run, and the emulator should launch, providing you with the following experience.

    Окончательный выполняющийся образец приложения для iPhone.

См. также

Дата сборки:


Добавления сообщества