Skip to main content
Participant
September 11, 2014
Answered

iOS 8 GM and AIR 15 CameraRoll

  • September 11, 2014
  • 2 replies
  • 3478 views

Hi,

My app, which worked perfectly under iOS7 has suddenly started falling over under iOS8 GM. I have builds under both AIR 14 and AIR 15 which both experience the same problem, so I' pretty sure it's iOS related. I'm running on an iPad 1458.

The issue is when loading images from the camera roll. I'm getting seemingly random "Error #2044: Unhandled IOErrorEvent:. text=Error #2032: Stream Error."  when invoking loadFilePromise():


  private function cameraRollMediaSelectHandler(event :MediaEvent): void

  {

  var promise:MediaPromise = event.data as MediaPromise;

  loader = new Loader();

  loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);

  loader.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorHandlerAsyncErrorEventHandler);

  loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandlerIOErrorEventHandler);

  loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorHandlerSecurityErrorEventHandler)

  loader.loadFilePromise(promise);

  (FlexGlobals.topLevelApplication as IPleaseWait).pleaseWait( true);

  }

Has anybody else come across this? Any resolutions?

Thanks!

Simon

This topic has been closed for replies.
Correct answer SimonGladman

Thanks so much for looking at this Pravendra.

I've tested the CameraRoll related features in all our existing apps using the iOS8 GM on an iPad2 and all work as expected (both using live version of our app built using AIR 14 and new builds using the latest AIR 15 build).

So all seems to work fine for our apps. The code we use is practically the same as yours.

Simon, Are you still having problems ???

Very best wishes,

John


It's very odd - with some older images, my application falls over the first time I attempt to load it, but works subsequently. I've added error handlers everywhere, but still can't catch it. My recent images work fine.

However, and this is a big however, I'm writing a similar application using Swift, so it's a native app. A very similar issue exists, only the app doesn't crash, it just returns a nil image.

This leads me to believe it's an issue with iOS 8 and *not* with AIR.

So, John and Pravendra, it looks like I was barking up the wrong tree! My apologies and thanks to you both for your help,

Simon

2 replies

Participating Frequently
September 12, 2014

Thanks for reporting the issue.

We are not able to reproduce the issue at our end. Images are loaded properly on calling loadPromise() method.


However, On calling  loadFilePromise in iOS7, there are two options: Camera Roll and My Photo Streams and in iOS8, All Photos/ Recent" Photos are the options.

Could you please provide us with the sample example to reproduce the issue.

Thanks again,

Pravendra

Adobe Air

Inspiring
September 12, 2014

Thanks for replying Pravendra !

So, just to confirm, you should still be able to use the CameraRoll class (CameraRoll - Adobe ActionScript® 3 (AS3 ) API Reference  ) in iOS8 to browse for image data in the system media library(ies) as before and it will bring the relevant areas to browse ?

And then use loadFilePromise(promise)

to load the data ?

Are the 2 options you mentioned for loadFilePromise managed by AIR behind the scenes ? Looking at  Loader - Adobe ActionScript® 3 (AS3 ) API Reference I couldn't see any reference to them.


And presumably, we'd need to rebuild for iOS8 with the latest AIR SDK or we'll have problems with the CameraRoll ?

Inspiring
September 12, 2014

Yikes! Seems like there has been a change to CameraRoll ... No camera roll iOS 8 - MacRumors Forums

Anyone else having the problem or know of any workarounds ???