Copy link to clipboard
Copied
Does any one know how to pass a vector containing custom objects to iOS via an ANE?
I can easily send over vectors of primitive types fine - int, string etc but, I want to send over a vector containing a custom object.
In this case it's a documentVO which has 'properties' of "title" and "description".
Ideally I don't want to send over two parallel vectors - one for each property.
Basically problem is...I have the 'object' in Obj-c as a FREObject but how do I get past that and access the properties or convert the FREObject representation of the vector over to a NSMutableArray etc?
So...any ideas?!
Nightmare...
Copy link to clipboard
Copied
Have you considered just passing back and forth JSON? Could even be a single JSON string that bundles the array nature of your data as well, marshalling the data to each side's respective data types and preserving your named properties structure.
JSON support is built-in to both the ActionScript side and the iOS side with NSJSONSerialization starting with iOS 5.