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

Generating a Certificate Signing Request using Windows


A Development Certificate is used to identify a developer for the purpose of installing and testing apps on iOS devices. Without one you can't publish native iOS apps from Flash Professional. You obtain a development certificate from Apple's iOS Provisioning Portal but to do that you must first generate a Certificate Signing Request (CSR) file.

The process for generating a CSR differs depending on your choice of operating system.

The steps for Microsoft Windows are covered here. If you are using Mac OS X, then refer to the Generating a Certificate Signing Request using Mac OS X recipe.

Getting ready

  1. CSR files are generated using OpenSSL, which can be downloaded and installed from www.slproweb.com/products/Win32OpenSSL.html. You will actually need to install two files from the site.

  2. First scroll down to the Download Win32 OpenSSL section and download the Visual C++ 2008 Redistributables installer. Simply run the executable and follow the wizard through the installation process.

  3. Next, download and run the Win32 OpenSSL v1.0.0e Light installer. The wizard will ask you to select where OpenSSL should be installed. Keep the default location set to C:\OpenSSL-Win32. Additionally, when prompted, instruct the installer to copy OpenSSL's DLLs to The Windows system directory.

How to do it...

  1. Open a command prompt window using administrator privileges.

    Note

    How you run a command session with administrator privileges depends on your choice of operating system.

    If you are a Windows 7 or Vista user, then click on the Start button and type cmd into the search box. However, rather than simply pressing Enter, you should press Ctrl + Shift + Enter. A dialog will appear asking if you want to allow the program to make changes to your computer. Click on the Yes button.

    If you are using Windows XP, then ensure you are logged on with an administrator account. Click on the Windows Start button and then select Run. From the Run dialog box, type cmd and press Enter.

  2. From the command prompt move to OpenSSL's bin folder by entering the following command:

    cd C:\OpenSSL-Win32\bin
    
  3. Now create a private key by entering:

    set RANDFILE=.rnd
    

    followed by:

    openssl genrsa -out mykey.key 2048
    
  4. The file, mykey.key, will be output to OpenSSL's bin folder.

    Note

    OpenSSL may still output a file after reporting an error on the command line. If you find an error, check your syntax and run the command again as it's unlikely your file will be usable.

  5. Using your private key you can now create the CSR file. To do this, a command with the following format is required:

    openssl req -new -key mykey.key -out CertificateSigningRequest.certSigningRequest  -subj "/[email protected], CN=John Doe, C=US"

    You will need to make some changes when typing the preceding command into the command line. Replace the e-mail address and certificate name with the same e-mail address and name you enrolled within the iOS Developer Program. Also, if you live outside the United States, you will need to edit the country code.

    Note

    A list of country codes that can be used when creating a CSR can be found on the DigiCert website at www.digicert.com/ssl-certificate-country-codes.htm.

    A CSR file named, CertificateSigningRequest.certSigningRequest will be created and output to the bin folder.

How it works...

You now have a CSR file that contains your personal information (your name, e-mail address, and country) and will be used to request a development certificate from Apple.

When the CSR file was created, OpenSSL also created a public and private key. The public key is included within the CSR file while the private key is used to sign the request.

Don't delete your CSR file or the private key as they will both be required later in this chapter.

See also

  • Obtaining your development certificate