I am getting the following error linking against the Aviary SDK using MonoTouch.
-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0x9b0f1d0
The problem occurs when I try to push the linked controller.
PresentViewController(photoEditor, true, new NSAction(() => {}));
I have pushed/shared my project to https://github.com/theonlylawislove/MonoTouch.Aviary where you can reproduce the problem.
My Demo application works on iOS 6 simulator, but the mentioned error happens on iOS 5 simulator (and device).
I took all the content (.a/bundles) straight from the latest Aviary SDK 3.0. The demo application provided by them (with same .a lib) works on iOS 5 so the problem must be with MonoTouch and the linking.
Here is my linking flags.
[assembly: LinkWith ("libAviarySDK.a",
LinkTarget = LinkTarget.ArmV7 | LinkTarget.Simulator,
ForceLoad = true,
IsCxx = true,
Frameworks="Accelerate CoreData CoreText Foundation MessageUI OpenGLES QuartzCore StoreKit SystemConfiguration UIKit",
WeakFrameworks="AdSupport",
LinkerFlags="-ObjC -all_load -fobjc-arc -lz -lsqlite3.0")]
Any ideas? Thanks in advance! I am hoping to get the solution working to share it with the community since Aviary doesn't provide MonoTouch bindings.
Complementing @Poupou's answer, it's easy to make that selector available in iOS 5 all you need is to link against libarclite.a
.
Here is a sample of a Xamarin.iOS binding using it also if you want you can grab libarclite.a
from there.
Just add libarclite.a
to your binding project and you should be good to go.
Hope this helps
Alex