Use iOS Simulator to detect and debug air applications

Source: Internet
Author: User
Tags pkcs12

Adobe AIR 3.3 includes support for native iOS emulators and provides a quick way to detect and debug iOS applications. The iOS simulator is part of the Apple Xcode IDE, designed to create applications for Mac,iphone and the ipad. For more information on the iOS emulator, see Using the iOS emulator. Before this feature, the only way to test an air application on iOS is to use an actual device and an Apple development certification. Now you don't need to get a development certificate (which can be a time-consuming process) or create a profile to detect and debug your air application. A P12 certificate is enough to prove your ability. Note that although you no longer need to develop authentication or configuration files to detect and debug, you still need to configure them to itunes. You can refer to this link to create a P12 certificate. As described here, self-signed certificates can also be created using Flash Builder. You can use the same self-signed certificate for desktop applications.
packaging applications for the iOS emulator

Currently, Flash Builder does not support iOS simulators, but you can access it from the command line using ADT.

The iOS simulator is based primarily on the x86 architecture and two newly added ADT objects: Ipa-test-interpreter-simulator ipa-debug-interpreter-simulator

To package an application for the iOS emulator, use –package to execute ADT on the command line and use –target to specify one of the targets. For example, for a detection annotation target you can perform 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 Emulator SDK is/DEVELOPER/PLATFORMS/IPHONESIMULATOR.PLATFORM/DEVELOPER/SDKS/IPHONESIMULATOR5.0.SDK

For debugging annotation targets, you can execute the following command: 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>

Please note that the command for this debug target does not specify an IP address. This is because the emulator always starts on the local machine, so no IP address is required. You can find more information about detection and debugging here.

Also note that when you package an application for the iOS emulator,-PLATFORMSDK here.

Installing and starting an application

Once the application is packaged, you can use ADT and –installapp to install it into the iOS simulator, such as Adt-installapp-platform ios-platformsdk <path to iOS Simulator sdk& Gt -device Ios-simulator-package Sample_ipa_name.ipa

After installation, you can use ADT and –launchapp to launch and run it on the iOS emulator, such as: Adt-launchapp-platform ios-platformsdk <path to iOS Simulator sdk>-D Evice Ios-simulator-appid Sample_ipa_name

This AppID value is specified in the <id> tab of the application description file (app.xml). Flash Builder the AppID as the default name for the application.

This application can be uninstalled directly through the UI. Alternatively, you can uninstall from the command line using –uninstallapp: Adt-uninstallapp-platform ios-platformsdk <path to iOS Simulator sdk>--device Simulator-appid Sample_ipa_name

Note: If you uninstall a program using ADT, its icon will still remain in the iOS emulator until you reboot the emulator. testing Local extensions in the iOS emulator

When you want to test the local extension in the iOS emulator, use the Iphone-x86x86 platform name in the Extension.xml file, and specify the LIBRARY.A (static library) in the nativelibrary element. Be sure to use a static library (. A file), which is compiled for the emulator, not a static library for the device.

The following are 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 local extension for the iOS emulator, the ADT command will look like this: Adt-package-target ane sample_ane_name EXTENSION.XML-SWC <path to SWC file> RM iphone-x86 library.a library.swf-platformoptions <path to platform descriptor

The-platformoptions here is only needed when additional link options need to be developed. Next Reading Direction

For more information on air and mobile devices, see developing air applications for mobile devices. For more information on local extensions, see the local extension for air.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.