Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Adobe AIR Developer Center /

Using the iOS Simulator to test and debug AIR applications

by Neha Gupta

Neha Gupta

Content

  • Packaging an application for the iOS Simulator
  • Installing and launching an application
  • Testing native extensions in the iOS Simulator
  • Where to go from here

Created

30 July 2012

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Adobe AIR debugging iOS mobile testing

Requirements

Prerequisite knowledge

Previous experience building AIR apps for iOS will help you make the most of this article.


Additional required other products

Xcode

  • Download

User level

Intermediate

Required products

  • Adobe AIR

Adobe AIR 3.3 includes support for the native iOS Simulator, providing a fast way to test and debug iOS apps. iOS Simulator is part of Apple's Xcode IDE for creating apps for Mac, iPhone, and iPad. To learn more about the iOS Simulator, see Using iOS Simulator. Prior to this feature, the only way to test AIR apps on iOS was with an actual device and a developer certificate from Apple. Now you can test and debug your AIR apps without obtaining a developer certificate (which can be a time consuming process) or creating a provisioning profile. A p12 certificate, which you can create and sign yourself is sufficient. Note that although you no longer need a developer certificate or provisioning file to test and debug, you do need still need them to deploy to iTunes. You may refer to this link to create a p12 certificate. A self signed certificate can also be created using Flash Builder, as described here. You may use the same self-signed certificate, as used for Desktop applications.

Packaging an application for the iOS Simulator

Support for the iOS Simulator is currently not available in Flash Builder, but you can access it from the command line using ADT.

The iOS Simulator is based on the x86 architecture and two new targets have been added in ADT to support it:

  • ipa-test-interpreter-simulator
  • ipa-debug-interpreter-simulator

To package an app for the iOS Simulator, execute ADT at the command line with –package and use –target to specify one of these targets. For example, for the test interpreter target you can execute the following:

adt -package -target ipa-test-interpreter-simulator -storetype pkcs12 -keystore Certificates.p12 -storepass password Sample_ipa_name sample_ipa-app.xml sample_ipa.swf -platformsdk <path to iOS Simulator SDK >

An example path to the iOS Simulator SDK is /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk

For the debug interpreter target, you can execute the following:

adt -package -target ipa-debug-interpreter-simulator -connect -storetype pkcs12 -keystore Certificate.p12 -storepass password Sample_ipa_name sample_ipa-app.xml sample_ipa.swf -platformsdk <path to iOS Simulator SDK>

Note that the command for the debug target does not specify an IP address. This is because the simulator will always be launched on the local machine, so no IP address is needed. You can find more information on test and debug targets here.

Also note that -platformsdk and the path to the external iOS Simulator SDK are always required when packaging an application for the iOS Simulator. You can find more information on using ADT here.

Installing and launching an application

Once you have packaged your application, you can install it in the iOS Simulator with ADT and –installApp ; for example:

adt -installApp -platform ios -platformsdk <path to iOS Simulator SDK> -device ios-simulator -package sample_ipa_name.ipa

After installing the app, you can launch and run it on the iOS Simulator using ADT and –launchApp ; for example:

adt -launchApp -platform ios -platformsdk <path to iOS Simulator SDK> -device ios-simulator -appid Sample_ipa_name

The appid value is specified in the application descriptor file (app.xml) within the <id> tag. Flash Builder uses the app name as the appid by default.

The application can be uninstalled from the iOS Simulator directly through the UI. Alternatively, you can uninstall it via the command line using –uninstallApp :

adt -uninstallApp -platform ios -platformsdk <path to iOS Simulator SDK> -device ios-simulator -appid Sample_ipa_name

Note: If you uninstall an application using ADT, its icon will remain in the iOS Simulator until you restart the simulator.

Testing native extensions in the iOS Simulator

When you want to test a native extension in the iOS Simulator, use the iPhone-x86 platform name in the extension.xml file and specify library.a (the static library) in th e nativeLibrary element. Be sure to use the static library (.a file) that is compiled for the simulator and not the static library that is compiled for the device.

Here is a typical extension.xml with these settings:

<extension xmlns=”http://ns.adobe.com/air/extension/3.1“> <id>com.cnative.extensions</id> <versionNumber>1</versionNumber> <platforms> <platform name=”iPhone-x86″> <applicationDeployment> <nativeLibrary>library.a</nativeLibrary> <initializer>TestNativeExtensionsInitializer</initializer> <finalizer>TestNativeExtensionsFinalizer</finalizer> </applicationDeployment> </platform> </platforms> </extension>

To package a native extension for iOS Simulator the ADT command would look like the following:

adt -package -target ane Sample_ane_name extension.xml -swc <path to SWC file> -platform iPhone-x86 library.a library.swf -platformoptions <path to platform descriptor file>

Here, -platformoptions is only required if additional linker options need to be specified.

Where to go from here

For more on AIR and mobile devices, see Developing AIR applications for mobile devices. To learn more about native extensions, see Native Extensions for AIR.

More Like This

  • What's new in Adobe AIR 3
  • Installation and deployment options in Adobe AIR 3
  • Uploading images from CameraRoll and CameraUI
  • Multiscreen development techniques with Flex and Adobe AIR
  • Using Flash Builder 4.5 to package applications for Apple iOS devices
  • Packaging Adobe AIR applications
  • Considerations for developing Adobe AIR applications for mobile
  • Licensing Adobe AIR applications on Android
  • What's new in Adobe AIR 2.6
  • iOS features in Adobe AIR 2.6

Tutorials and samples

Tutorials

  • Using the iOS Simulator to test and debug AIR applications
  • Using the Amazon In-App Purchase Adobe AIR native extension for Android and Kindle Fire
  • Transferring data with AIR native extensions for iOS – Part 3
  • Exchanging Vector and Array objects between ActionScript 3 and C, C++, or Objective-C

Samples

  • Licensing Adobe AIR applications on Android
  • Using web fonts with Adobe AIR 2.5
  • Using Badger for Adobe AIR applications

AIR blogs

More
07/09/2012 Protected: Publishing Adobe AIR 3.0 for TV on Reference Devices
07/08/2012 Source Code: Adobe AIR 3.3 Retina Video Application
07/06/2012 Application specific File Storage on Adobe AIR based ios Application
07/04/2012 Recent Work - iPad/Android App: Inside My toyota

AIR Cookbooks

More
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay
01/20/2012 Skinnable Transform Tool
01/18/2012 Recording webcam video & audio in a flv file on local drive
12/12/2011 Date calculations using 'out-of-the-box' functions

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement