Obtaining Trace output logs on device for AIR on iOS

The mm.cfg text file can be used to obtain logs of trace() output in Adobe AIR applications on iOS.
Here are the steps you will have to follow to add the mm.cfg file to your IPA:

  1. When packaging from commandline add mm.cfg to the list of files you give for packaging.
    adt.jar -package -target ipa-debug -provisioning-profile My_Development_Provision.mobileprovision -storetype pkcs12 -keystore My_Development.p12 -storepass xxxxx MyApp.ipa app.xml MySwf.swf mm.cfg
    When using flash builder add the file along with your main swf.
  2. Use the debug version of the swf to package the IPA.
  3. Output log files will be created in ApplicationData->document->Logs folder. Choose Windows->Organizer and follow the following steps to save the contents of this folder on your desktop:
    1. In the left pane, choose the device.
    2. In summary tab, Click on the application whose data folder you want to save.
    3. Click on the small downward arrow.
    4. Choose the location in the pop up and save the data folder.

mm.cfg creates a file named FlashLog.txt in the Logs folder. You can view the traces by adding TraceOutputFileEnable=1 and ErrorReportingEnable=1 in mm.cfg. There is a variable called TraceOutputFileName for setting the location of the trace file. Do not use that on iOS.

The ActionScript reference explains how to use the global trace function to add traces to your program.

The format of the file and the configuration parameters are explained in this KB article.