Book Image

Flash iOS Apps Cookbook

By : Christopher Caleb
Book Image

Flash iOS Apps Cookbook

By: Christopher Caleb

Overview of this book

The latest version of Flash Professional can directly target iOS, allowing Flash developers to write applications that will run natively on Apple's iPhone, iPad, and iPod touch. What's more, with Apple loosening its restrictions on third-party technologies, apps written in Flash can now be sold and distributed within the App Store.Flash iOS Apps Cookbook provides the recipes required to build native iOS apps using your existing knowledge of the Flash platform. Whether you want to create something new or simply convert an existing Flash project, the relevant steps and techniques will be covered, helping you achieve your goal.Learn how to configure and use Flash Professional for iOS development by writing and deploying a simple app to a device. Implement many iOS-specific features such a multi-touch, the virtual keyboard, camera support, screen orientation and the Retina display. Overcome the limitations of mobile development by mastering hardware acceleration and optimization. Whether you're an enthusiast or professional developer, the Flash iOS Apps Cookbook is your toolkit to creating high-quality content for iPhone, iPad and iPod touch.
Table of Contents (21 chapters)
Flash iOS Apps Cookbook
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a development provisioning profile


Once you have a development certificate and at least one registered iOS device and an App ID, you are ready to create a provisioning profile. A development provisioning profile is a file that ties an app (or group of apps) to one or more authorized developers and a set of devices. Before you can test an app on a device, you must first install a provisioning profile onto it. A device can have multiple provisioning profiles installed.

Provisioning profiles are created from the iOS Provisioning Portal.

This recipe will take you through the steps required to create a provisioning profile that will allow you to test this book's examples on a device.

Getting ready

In order to complete this recipe, you will need to create a development certificate, register an iOS device, and have an App ID. If you haven't already done this, then complete the following recipes first:

  • Obtaining your development certificate

  • Registering a device

  • Creating an App ID

How to do it...

Follow the steps to create a development provisioning profile:

  1. Log into the iOS Dev Center at http://developer.apple.com/devcenter/ios and move to the Provisioning Portal.

  2. Click on the Provisioning link on the left-hand side of the Portal's home page. You will be taken to the provisioning page and the Development tab will be selected.

  3. Click on the New Profile button found at the far-right of the Development Provisioning Profiles heading. You will be taken to the Create iOS Development Provisioning Profile page.

  4. From this page you will generate a provisioning profile by performing the following steps:

    • Assigning a name to the provisioning profile.

    • Associating a development certificate with it.

    • Selecting an App ID.

    • Selecting one or more iOS devices that can be used for testing.

  5. First, enter Flash iOS Cookbook into the Profile Name text field. From the Certificates field, check on the checkbox next to your development certificate. From the App ID drop-down box, select the General Development App ID you created a while ago. Finally, check on the checkbox next to the device you would like to test this book's examples with. If you have registered more than one device, then you can select them all.

  6. Click on the Submit button at the bottom-right of the page.

  7. You will be taken back to the Development Provisioning Profiles page where your provisioning profile will be listed with a status of Pending assigned to it. Refreshing the page in your browser will change the provisioning profile's status to Active.

    Tip

    You may need to refresh your web page a few times before the status eventually updates.

  8. Now click on the Download button underneath the Actions column. Save the Flash_iOS_Cookbook.mobileprovision file to the same location as your P12 certificate file. For the exact path, refer to either the Creating a P12 certificate using Windows recipe or the Creating a P12 certificate using Mac OS X recipe.

How it works...

Your development provisioning profile has been associated with the General Development App ID from the Creating an App ID recipe. Being a wildcard App ID, this provisioning profile can be used to run and test any of this book's examples on an authorized device.

The provisioning profile needs to be installed on authorized devices and is also required by Flash Professional. In order to compile a native iOS app, you need to provide Flash with not only your P12 certificate file, but also the provisioning profile associated with the app you are attempting to compile.

Tip

Testing without a device

If you are testing from the ADL rather than deploying to an iOS device, a provisioning profile isn't required.

There's more...

Before we move to the final recipe, you may find the following additional information useful.

Profile expiration

A development provisioning profile is restricted to app development and is valid for only three months. If your provisioning profile expires during development, then you will need to create a new one from the Provisioning Portal. Remember to install the new profile on any authorized devices and to rebuild your app from Flash using your new profile.

Editing provisioning profiles

Unlike App IDs, a provisioning profile can be removed from the Provisioning Portal. From the list of provisioning profiles, simply check on the checkbox next to each one you would like to delete. And click on the Remove Selected button at the bottom of the list of profiles.

You can also edit an existing provisioning profile. On the right-hand side within the Actions column, click on the profile's Edit link. You can either modify the original details you associated with the profile or even make a duplicate copy of a profile before making changes to it.

Additional provisioning profile types

There are in fact three types of provisioning profile that can be created. This book will focus on the use of the development provisioning profile but the provisioning process also covers two methods of distribution—Ad Hoc and App Store.

An Ad Hoc Distribution Provisioning Profile is used to share an app with up to 100 other iOS users for testing. An App Store Distribution Provisioning Profile on the other hand is used to build and submit an app to the App Store.

When creating either an Ad Hoc or App Store distribution provisioning profile, you will need to request and use a distribution certificate rather than the development certificate required by a development provisioning profile.

For more details, refer to the Distribution section of the Program User Guide, which can be found within the Provisioning Portal's Resources section.

Working with multiple team members

If you are working in a team environment, you must be either the Team Agent or a Team Admin to create a provisioning profile. When creating a provisioning profile, check on the checkbox next to the certificate of each team member who is to be granted permission to build and test the app(s) associated with the provisioning profile's App ID.