Using iPhone Apps as AIR Applications

January 8th, 2008 by ryanstewart

Using iPhone Apps as AIR ApplicationsWhile brainstorming about AIR with some people here in Seattle someone suggested taking applications that are specifically made for the iPhone’s web browser using iui and turning them into AIR applications. One such application that use all the time is the Facebook iPhone application. Since both AIR and the iPhone use WebKit, taking that application and putting it into AIR was relatively easy so I’ve created what I call iuiFacebookDesktop (I know, I should be in marketing). You’ll have remove the .zip extension because I don’t have the AIR Mime type set up yet.

This implementation just uses the mx:HTML tag with the location set to http://iphone.facebook.com with some extra code to handle the custom chrome and the option to make it transparent. Ideally I could take all of the source code for the iPhone application and have all of those files locally installed with the application but going through that code was more time than I had. You’ll also notice that it just refreshes the entire page. My plan is to go through the iPhone facebook code more and call the function that loads the feed information and just refresh that. I’d also like to be able to detect when a new feed item comes in and bubble that up so I can show a notification but detecting changes to the DOM isn’t easily done with AIR so I need to check with the engineering team. I’m going to have some followup posts this week discussing little parts of the application and I’ll also post the source code later this week (I just need to clean it up).

The goal was a quick/easy way to monitor my Facebook news feed items. There are a number of ways to do that but since the interface was so slick on the iPhone I figured I’d just borrow that. It makes a pretty good widget and I think there are some other good iPhone-specific sites that might make good AIR apps.

Also, the icon is a homage to the old Facebook logo. It’s a picture of me that I tried to make look like the old logo. Also, excuse my crappy graphics/icons.

[tags]iPhone, AIR, Facebook, iui[/tags]

Posted in Adobe, Rich Internet Applications

No Responses

  1. Andrew Muller

    Excellent Ryan, what a neat idea!

  2. Brandon

    AS for me – I like it! Don’t listen anybody

  3. J. Mihai

    That is absolutely brilliant Ryan !

    And the fact that the aplication is so simple and uses just mx HTML tag is even more great. I do remember reading something on this matter a while ago for DFR devices, let me see if I can find the article.

    Kind regards,
    J.Mihai

  4. Johannes Boyne

    Nice! Really cool idea! ;)

  5. alex

    thanks for your effort but for me i hate facebook

  6. Podatek

    @alex why hate you facebook?

  7. Alexander Marktl

    Hey Ryan.

    Can you post the source-code somewhere. I can do some skinning if you want…

  8. Ryan Stewart

    Hey Alexander, I’ll post the source this weekend and I’ll drop you an email. That would be awesome of you to skin it!

  9. Using iPhone Apps as AIR Applications | David Bisset: Web Designer, Coder, Wordpress Guru

    [...] Ryan Stewart has a really neat idea here. iPhone or iTouch iPod apps to Adobe AIR… “taking applications that are specifically made for the iPhone’s web browser using iui and turning them into AIR applications.” Tags: AIR, iPhone, iPod, iTouch [...]

  10. Adrian Aioanei

    Hey Ryan,

    This is nice and it’s another great example of how flexible AIR is. Alongside with FlashLite will link the desktop and device worlds meaning that developer builds just once for both environments. That will be cool (but will it happen ?).

    Adrian.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.

About Ryan Stewart – Rich Internet Application Mountaineer

A blog by a Platform Evangelist at Adobe covering Adobe's RIA platform. Includes posts about Adobe Flex, Adobe AIR, ColdFusion, LiveCycle, Thermo, and everything in between.