Esporta (0) Stampa
Espandi tutto

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 http://www.github.com, 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.

ImportantImportante
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.)

Informazioni sull'ambiente 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 https://github.com/WindowsAzure-Toolkits/wa-toolkit-ios 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 https://github.com/WindowsAzure-Toolkits/wa-toolkit-ios/zipball/master, uncompress the folder structure, and place the files in a location that is easily accessible location. It might look like this:

      Visualizzazione cartelle del ramo GitHub decompresso.
    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://github.com/WindowsAzure-Toolkits/wa-toolkit-ios.git

      2. https://github.com/WindowsAzure-Toolkits/wa-toolkit-ios.git

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

      Visualizzazione cartelle del ramo GitHub clonato.
  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 readme.md 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.

    Visualizzazione cartelle del ramo GitHub clonato.

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

    Visualizzazione cartelle dell'applicazione iOS di esempio.
  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:

    Tipo di compilazione di destinazione corretto.
  4. If you build and run, you should see the emulator appear. It should look like the following.

    Prima esecuzione dell'applicazione.
  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:

      Impostazione dei valori 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.

      Impostazione dei valori ToolkitConfig.
  6. Press Run, and the emulator should launch, providing you with the following experience.

    Applicazione finale iPhone di esempio in esecuzione.

Vedere anche


Data di compilazione:

2013-01-07

Aggiunte alla community

Mostra:
© 2014 Microsoft