Skip to main content
Participant
August 13, 2012
Question

air 3.3 and background ios apps

  • August 13, 2012
  • 2 replies
  • 10443 views

Hi All

I cannot find some coherent information on this so I am asking here.

I need to write an iOS app that needs to perform a webservice call every x minutes to update the slqite db on the device, even if the application is not running in the foreground.

From google what I could find out was that iOS will only allow your app to run a small time after closing(to finish an upload etc).

e.g. "AIR does not provide support for this iOS background processing model":  http://www.adobe.com/devnet/air/articles/considerations-air-apps-mobile.html#articlecontentAdobe_numberedheader_5

but then later " applications may now support location updates and networking in the background": http://forums.adobe.com/message/4380335http://forums.adobe.com/message/4380335

Can I do what I need in Air 3.3+ an iOS 5.1+ ?

Thank You

This topic has been closed for replies.

2 replies

Participating Frequently
December 3, 2012

This really is a big bummer and I don't see how this is not a high priority issue, regardless of the implications it may have.

Saying this is "as designed" simply shows that the design has some major flaws.

Participating Frequently
February 8, 2013

Hi People,

I've reposted this as a bug... vote for it again if you think its worth the effort.

https://bugbase.adobe.com/index.cfm?event=bug&id=3497587

October 15, 2012

Hi koloaval,

Did you finally found a solution?

According to that:

http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd1867-8000.html#WSd6d4f896b3a8801b-15a1d5f91370ecb9970-8000

and that:

http://blogs.adobe.com/airodynamics/2012/05/04/air-ios-background-behavior/

we should be able to execute task in background. But not any of my events (ENTER_FRAME, TIMER or SOUND_COMPLETE) are fired. SetTimeout neither.

My config:

Flex SDK 4.6 / AIR 3.4 / FlashDevelop / Windows 7

Please let me know if you have found something.

Regards

Adobe Employee
October 16, 2012

AIR 3.3 onwards, action script developers can execute short task in the background along with audio playback and location updates on iOS. In order to execute task in background, you would need to set

1) NativeApplication.nativeApplication.executeInBackground = true (in action script)

2) swf version should be 16 or more

3) namespace should be 3.3 or more (in application descriptor)

Please confirm if you have used the above settings in your app.

October 16, 2012

Hi,

I have NativeApplication.nativeApplication.executeInBackground = true in my Main.as

I also turn this property to true on NativeApplication.nativeApplication Event.DEACTIVATE

I compile with -swf-version=17 in my compiler options.

I use namespace 3.4 in the manifest.

I do my tests under iOS 6 on iPad 2, iPhone 4, iPhone 5, Acer Iconia tab/Android

And in my iOS manifest:

<key>UIApplicationExitsOnSuspend</key>

<false/>

<key>UIBackgroundModes</key>

<array>

                                 <string>audio</string>

                                 <string>location</string>

</array>

I also tried with AIR 3.5 beta/-swf-version=18. Same issue on both Android and iOS.

Do you confirm that should work? Or am I trying to do something impossible?

Because this page says Bakground "networking". Do that mean only the pre-background loader.load calls are working in background?

Regards