Skip to main content
Participant
June 16, 2013
Answered

setting executeInBackground = true on iOS Cannot create property error

  • June 16, 2013
  • 1 reply
  • 889 views

I'm using Flash Builder 4.7, created a Flex Mobile project.

When my application deactivates, it needs to send a single POSt HTTP request to my server. It takes a few milliseconds to send, and on Android it works just fine. However, on iOS, since the app is suspended, the request is not sent until I activate the app again.

I've looked online and tried this solution:

adding the line

    NativeApplication.nativeApplication.executeInBackground = true;

In the home view, or just before sending the request, raises an exception:

ReferenceError: Error #1056: Cannot create property executeInBackground on flash.desktop.NativeApplication.

          at views::BnpSampleHomeView$cinit()

          at global$init()

          at BnpSample()

          at _BnpSample_mx_managers_SystemManager/create()[_BnpSample_mx_managers_SystemManager.as:51]

          at mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()

          at mx.managers::SystemManager/initializeTopLevelWindow()

          at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()

          at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()

          at flash.events::EventDispatcher/dispatchEventFunction()

          at flash.events::EventDispatcher/dispatchEvent()

          at mx.preloaders::Preloader/timerHandler()

          at flash.utils::Timer/_timerDispatch()

          at flash.utils::Timer/tick()

Help is apprecaited

This topic has been closed for replies.
Correct answer Colin Holgate

Some parts of this topic may be of help:

http://forums.adobe.com/message/4359474

1 reply

Colin Holgate
Colin HolgateCorrect answer
Inspiring
June 16, 2013

Some parts of this topic may be of help:

http://forums.adobe.com/message/4359474

idanBnpAuthor
Participant
June 16, 2013

Thanks, that helped, I forgot to add -swf-version 16 to the Flex Compiler arguments...