1

     Haneke component for Xamarin seems to be quite solid, nevertheless I'm having strange issue with it on devices though on sim all works as expected. The app compiles and builds ok. But when launched on device when imageView.SetImage(imageUrl); then this happens:

-[UIImageView hnk_setImageFromURL:placeholder:success:failure:] unrecognized selector sent to instance 0x181b8090

Seems like extension method can't be discovered and the corresponding header .h file is missing or something like that in Haneke.dll itself. Code for the method call is:

                HanekeUIImageView.SetImage(photoCell.ImageView,//explicit call to extension method
                //this is something that I 
                //tried, the 'usual way' of method call
                //photoCell.ImageView.SetImage(
                    new NSUrl(link),
                    EmptyImage,
                    SuccessAction ?? new Action<UIImage>((img) => {
                        SLogger.Write("Image loaded for picture url {0}\n", link);
                        photoCell.ImageView.Image = img;
                    }),
                    FailureAction ?? new Action<NSError>((err) => {
                        SLogger.Write("Image load failed for picture url {0} with error {1}\n", link, err);
                    })
                );

Also, I would like to note that I've tried umm:) I guess all possible combinations of linker options and of course "Don't link", "Link SDK assemblies only", "Link all" in VS studio Build project tab.

Federico Navarrete
  • 3,069
  • 5
  • 41
  • 76
vertique
  • 69
  • 1
  • 12
  • If it does not work with **Don't link** then it's not a *managed* linker issue, still you might want to try setting different linker settings on the simulator to be 100% sure. The next step would be for you to ensure that this symbols is part of the `arm*` slice of your native library (.a). – poupou Mar 25 '15 at 17:42
  • It's not native library .a file - it's Haneke.dll, not sure how can I check that it has arm* slice, and yes - on sim all linker settings do work. Thanks – vertique Mar 26 '15 at 09:37
  • Binding components embeds the native library (.a) inside the .dll so it's easier to consume from applications. – poupou Mar 26 '15 at 13:39
  • Did you find an answer on this? Having same issue – Mittchel Aug 06 '15 at 12:30
  • Umm, well - yes and no, no cause not with Haneke:( but solved it with SDWebImage. It had glitch in table view due to cell refresh - but I fixed it with setting of image width in override in delegate. – vertique Aug 06 '15 at 13:32
  • Strange there is such an issue with Haneke - a published component in Xamarin component store, so it must be something specific to particular system/project setup. – vertique Aug 06 '15 at 13:34

0 Answers0