QueTwo's Blog

thouoghts on telecommunications, programming, education and technology

Geolocation issues with AIR on iOS (with a fix!)

The recent “GM” version of iOS 6 (this includes the production version that is now shipping on the iPhone 5) broke one of the APIs that Adobe AIR depends on for Geolocation.

If you have an app that was published with Adobe AIR 2.7 through AIR 3.4, your app will either get rejected if you are just submitting it to the store, or it may be broken if it is already in the store.  This is in addition to some other feature interaction issues that have also cropped up in iOS 6.

The bug is that the Geo Location (GPS) subsystem is never actually called — it fails silently, just as if the user denied the application to use the GPS.

Luckily, there is a work-around, but it does require a re-compile of your application.

  1. Make sure your app is running at least AIR 3.0.   AIR 3.4 is currently in production and it works great with this work-around.  AIR 3.5 is on the roadmap, and addresses some other iOS 6 issues (including the ability to address the full screen).
  2. Update the <name> tag within your descriptor XML document.  Wrap the actual name of your application in an extra <text: xml:lang=”en”> tag.  For example,
     <text xml:lang="en">MyGPSApp</text>
  3. Update the version number.
  4. Make sure your app is compatible with the new storage requirements in 2.23.  Details are available here : http://blogs.adobe.com/airodynamics/2012/03/05/app-compliance-with-apple-data-storage-guidelines/
  5. Compile, and wait.  Your app’s GPS should now work in iOS 3, 4 and 5.

Hope that helps some people out!  I know it was a big sticking point when I had some apps recently rejected because of this incompatibility.


6 responses to “Geolocation issues with AIR on iOS (with a fix!)

  1. swf September 21, 2012 at 4:03 am

    AIR 3.4 is out since august…

  2. Robert Chalmers October 21, 2012 at 11:14 am

    I am using CS6, FlashPro 6, AIR 3.4 and Geolocation broke on the ios6
    I applied your simple little fix – and it works again. Thanks

  3. Kevin Chua October 27, 2012 at 8:42 am

    Do you still need to declare these ?


  4. Alastair Moore January 2, 2013 at 9:07 pm

    Having absolutely no success with this. I’ve tried it in both AIR 3.3 and AIR 3.4. I’ve tried this exact change but my debugging is showing Geolocation to be muted. I’ve even tried adding the above location-services to the UIRequiredDeviceCapabilities with no success. I can’t imagine why it wouldn’t be working on my iOS 6 device.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: