Category: Flex

Deploying Flex iOS7 applications on the App Store

flex-ios-appsIf you did not know already, Apache Flex is a technology (a software development kit or SDK) used to build, and deploy cross-platform mobile applications or rich Internet applications (RIA). The technology has been donated to Apache in 2011, but still uses Adobe AIR or Flash Player as runtime. For many years, Adobe has been doing a great job of keeping its runtimes compatible with Apple’s guidelines and requirements.

A recent problem

In the past weeks, Apple announced that “Starting February 1, new apps and app updates submitted to the App Store must be built with Xcode 5 and iOS 7 SDK.” Could this really mean the death of Flex applications for iOS?

The solution

Fortunately, Adobe released a fix that is currently available through the latest beta release of Adobe AIR. So if you plan to publish on the App Store soon, you should re-run the Apache Flex SDK Installer, and where the installer asks you to select an AIR version, just select AIR 4.0beta. Proceed with the installation, and that’s it! Now build your app as you have always done, and enjoy the power cross-platform development!

Source: Building Apache Flex apps for iOS7

Update (March 2nd, 2014)

Please note that Adobe just changed the AIR versioning from 4.0 to 13.0 to synchronize it with Flash Player. When running the Apache Flex SDK installer, select the latest AIR version: AIR 13.0beta.

Installing Apache Flex SDK under Linux

apache-flex-small

Recently, the Apache Flex team released the latest version of Flex SDK: 4.10. This release came with a Linux installer for the first time since Adobe Flex Builder 3 alpha, several years ago. As a member of their user mailing list, I take part in certain discussions, often on the Linux support subject. It seems that users have difficulty installing the Flex SDK, even with the .deb (Debian software package) available on Apache Flex’s website. Taken from those discussions, here’s the easy way to install the Apache Flex SDK under Linux.

AIR dependency

Flex SDK is best installed using the SDK Installer, which requires Adobe AIR 2.6. If you didn’t already know, installing Adobe AIR on Linux isn’t that easy, as it is not supported by Adobe anymore. The easiest way I have found is this one:

  1. If you’re using a 64-bit Linux system, install the ia32-libs (AIR is 32-bit only):
    sudo apt-get install ia32-libs
  2. Go here (http://update.devolo.com/linux/apt/pool/main/a/adobeair/) and download the AIR installer for 64-bit systems (amd64) or 32-bit (i386)
  3. Install the package you just downloaded:
    sudo dpkg -i adobeair_2.6.0.19170_amd64.deb

You’re done with the installation of Adobe AIR.

Installing the SDK Installer

  1. Download the installer (.deb) here: http://flex.apache.org/installer.html
  2. Once you have downloaded the .deb, install it using dpkg (this command will force the installation, even if the AIR dependency is not resolved):
    sudo dpkg -i --force-depends apache-flex-sdk-installer-2.6.0-bin.deb
  3. Once the installer has been installed (you might encounter several warnings and errors, just ignored them), open a terminal and go the installation folder:
    cd "/opt/Apache Flex/Apache Flex SDK Installer/bin"
  4. Run the installer:
    ./Apache Flex SDK Installer
  5. Now you just need to decide where you want the SDK to be installed, and you’re good. Everything should go smoothly.

Uninstalling the SDK Installer

I really suggest that you uninstall the SDK Installer (but not the SDK, of course!) when you’re done, because it will cause you all sorts of errors with apt-get in the future. Errors that look like this:

 

org.apache.flex.installapacheflex:i386 : PreDepends: adobeair:i386 (>= 1:2.6.0.0) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

This can be done very easily with the following command:

sudo apt-get -f install

As always, feel free to ask any question you might have, I’ll do my best to answer them. Have fun developing with Apache Flex and Linux!

Flash Builder: How to Disable the Annoying Click Sound

Adobe Flash Builder 4 LogoI’ve been developing in Flash Builder 4 (under Windows 7) a lot in the last months, and there’s a detail that REALLY annoys me: a click sound every time a file is opened or closed, or when a information bubble pops, and in too many other occasions. After going through each and every Flash Builder option, I finally found a way to get rid of that sound with the precious help of our friend Google. Seems this “problem” is related to Eclipse (on which Flash Builder is built), and Windows (no way!). So the way to disable this click sound is by going to:

Control Panel -> Sounds ->Windows Explorer -> Start Navigation

Set this value to “None”, and you’re done! You don’t need to code with your speakers turned off anymore!

Flex application on iOS with Flash Builder 4.5.1

Why Windows?

Flex on iOSFirst thing I have to say is that this tutorial is for Windows only. I’m sorry, but at this point, developing Flex applications under Ubuntu is a bit too complicated. I am not a Mac user, so I have to use Windows for Flex development. My computer has an i7 CPU and 8GB of RAM, so I prefer to use a Windows 7 virtual machine instead of dual boot, but feel free to go with your own preference here.

Adobe Flash Builder 4.5.1

On June 20th, an update of Flash Builder 4.5 (4.5.1 in fact) was released. It includes more support for iOS and Blackberry tablet. It is now very easy to deploy on iOS devices, as long as you have the correct certificate files (next section).

Before you continue, make sure your Flash Builder is up-to-date:

  1. Start it as administrator (right click on the program icon and click “Run as administrator”)
  2. Go in Flash Builder’s Help menu -> Search for Flash Builder Updates…
  3. Accept and install all updates
  4. Go back to Help menu -> Software Updates…
  5. Accept and install all updates
  6. Restart Flash Builder

Generate required certificates

To be deployed in “development mode” on your iOS device(s), your application needs to be digitally signed. Here’s the documentation on how to achieve all the different steps. Remember to follow instructions for Windows!

Three very important things you need to know:

  1. Open a DOS shell “as Administrator” to avoid some OpenSSL errors and warning.
  2. Before generating your key (as you will read in the documentation), execute the following command in your DOS shell: set RNDFILE=.rnd or you will get the following error: unable to write ‘random state’ e is 65537 (0x10001).
  3. When using OpenSSL, do not ignore error messages. If OpenSSL generates an error message, it may still output files. However, those files may not be usable. If you see errors, check your syntax and run the command again.

Create a Hello World application

Now, let’s create a very simple Hello World application using Flash Builder.

  1. In Flash Builder’s menu,go to: New / Flex Mobile Project
  2. Give it a name and click Next
  3. Select Apple iOS as your only target platform
  4. Select the View-Based Application template and click Finish
  5. Add a simple Label object saying “Hello World” or whatever you like in the View that is automatically created
  6. Let Flash Builder know about your certificates:
    1. Open the Project Properties window
    2. In the left menu, go to Flex Build Packaging / Apple iOS
    3. Browse and select your certificate file (.p12 file created earlier)
    4. Browse and select your provisioning file (downloaded from your Apple account)
  7. Build your project (or make a release build for better performance and lighter footprint).

For a video tutorial that might help you even more, please visit this page.

Add your device to your developer account

Just like it is required during standard native application development, your device needs to be “ready” for development. Here’s Apple documentation on how to do that: Provisioning a Device for Development (you’ll have to scroll down a little). I’m sorry for not giving any more help on this point. I don’t know a lot about Apple’s development processes. That part was actually done by another member of my team. But I’m sure Google will give you all the help you need. 😉

Deploying using iTunes

You’re almost there! Here are the final steps, all done using iTunes:

  1. Import your provisioning profile into iTunes
  2. Import the ipa file built by Flash Builder (found in the “bin-debug” folder of your project’s workspace) into iTunes
  3. Sync your iOS device so your application gets installed

That’s it! I’m aware there might be some missing details in this tutorial, but feel free to post any question you might have. I’ll be very happy to help.

© 2017 Evil Coding Monkey

Theme by Anders NorenUp ↑