InitWithCoder was clearly flagged with an invalid error using the latest version of Xamarin.iOS

During compilation, I see the following error when working with the latest version of Xamarin.iOS, which was released yesterday:

UIActivityViewController.h: 23: 1: note: "initWithCoder:" was explicitly marked here unavailable - (nullable instancetype) initWithCoder: (NSCoder *) aDecoder NS_UNAVAILABLE;

I donโ€™t remember ever having this problem, and my code hasnโ€™t changed much between the last update and now. Can someone help me figure out what's going on?

+6
source share
1 answer

This is a known issue that is harder to diagnose due to clang error, i.e. it has nothing to do with the UIActivityViewController .

You may be able to get around this by removing [Export ("initWithCoder:")] inside your code. This should be good if your managed entity should not be created from native code. Ymmv

+4
source

All Articles