Debugging iPad or iPhone apps that you built with FlashBuilder has a number ofÂ extra steps that you donâ€™t need when developing with Android. This is especially true if you use Windows as your primary operating system. The good news is that once youâ€™ve done it once or twice it should be fairly straight forward. So here are a few hints to get you going.
Step 0. If youÂ are building on Windows make sureÂ to install the latest version of iTunes.Â ThenÂ check that your iPad or iPhone can be synched with iTunes.Â If you use a mac you’veÂ most likelyÂ already done this step (in your sleep a hundred times).
Step 1. Make sure you have a certificate and provisioning file. This must be configured under FlashBuilder Project > Properties > Flex Build Packaging. IMPORTANT:Â If the certificate and provisioning file are not set up or are not validÂ you will not be able to compile your project. If you donâ€™t know what this is or how to do it, additional info can be found here in a great blog post by Holly Schinsky (@devgirlFL).
Step 2. Set up a Debug Configuration. If you donâ€™t know where that is, select the pulldown next to the bug icon on the FlashBuilder toolbar and then choose Debug Configuration, or go to Run > Debug Configurations. Choose Apple iOS as your Target Platform. Be sure to select the On DeviceÂ Packaging Method > Fast! If you donâ€™t do this and you choose the Standard optionÂ it will take five or more minutes to compile the build each time you hit debug, and that can become a huge time waster really fast. One advantage of using the Standard option is it will perform more like the final release build.Â In comparison,Â the Fast version won’t be as performant. So, for the vast majority of your debugging you should probably use Fast, and when you want to test a final build then you might want to choose Standard. When you are ready select the Debug button.
Step 3. Â You will then see a popup window with six important instructions.Â Once youÂ have completed Steps oneÂ and two,Â select the Show package in Explorer link.
Step 4. Drag the .ipa file from your file browser window into the iTunes Library > Apps area.
Step 5. Select the Sync button on the bottom right hand corner of iTunes. You should see Sync In Progress screen on your device. Let the operation complete. When itâ€™sÂ finished you should see a message in the message box at the top of iTunes that says the sync was successful. If there was an error it will also show up in the message box at the top of the iTumes application window.
Step 6. Launch the application on your iPad or iPhone. You should get a popup windowÂ titled Flash Debugger that asks for the IP address or hostname. Â Important: Â yourÂ iPad or iPhoneÂ and your development machine need to be on the same wireless LAN, if they aren’t then this step won’t work. If you don’t have a wireless LAN handy you can always log both machines into a MiFi or some other type of mobile hotspot. Then enter the IP address of your development machine. On a windows machine you can easily get that in a DOS prompt using the command ipconfig. Hit OK.
The Final Result.Â If all goes well the app will launch and you will start to see debugging output in FlashBuilder.