Question

I am working on a simple AIR native extension for iOS which is using external accessory to read the data from SmartCard and transfer it to AIR application. I have managed to transfer the fields returned as NSString succesfully, but I'm struggling to get the photo (returned as NSData). I'm not an iOS or Obj-C pro (in fact it's my first contact with them). I've searched numerous threads and sites, but couldn't find the solution to my problem.

The program is working in such a way:
- user presses the button in the flex app
- the app calls the ANE method
- the ANE reads the data from the smartcard in NSData format (up to this point it's ok)
- i need to package the nsdata object into FREByteArray and send it back to flex app (how to do it?)

Anyone could help in this field? Thanks

Was it helpful?

Solution

Ok, it seems I have found the solution. It was necessary to provide empty byte array from the ActionScript side of the application to the native extension, and then just fill it in the ANE with data. Looks weird, but works :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top