Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

in iOS, to use Platform Effect, I got "no default constructor" exception. Works if "Don't Link".

$
0
0

I wanted a small tweak to how the keyboard worked in iOS and so decided to use an EFFECT.

But, I ran into trouble: System.MissingMethodException, no default constructor, on my iOS class implementing the effect. This was raised when I called Effect.Resolve().

I checked everything multiple times, and added an explicit default constructor, but no change.

Googling all I could find, I found a comment, "Check Link behavior option in iOS build window. For me, setting to "Don't Link" fixed the issue. But I didn't have enough time to investigate this further.", on this page, which doesn't seem like it would be directly related: [iOS] System.MissingMethodException: Default constructor not found for type System.Array #418

So, I went to the iOS build page, changed to "Don't Link" (it was "Link All"), and it suddenly started to work.

I'm not sure of the ramifications of "Don't Link", and if this will be a robust solution to this. It sure doesn't seem like it should be this way. Any further insights?


Viewing all articles
Browse latest Browse all 77050

Trending Articles