Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
When compiling iOS app for actual device I'm getting this warning:
MyApp/iOS/MTOUCH: Warning MT4146: The Name parameter of the Registrar attribute on the class 'FloatLabeledEntry.FloatLabeledTextField' contains an invalid character: ' ' (0x20) (MT4146) (MyApp.iOS)
followed by this error:
MyApp/iOS/MTOUCH: Error MT4109: Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com (MT4109) (MyApp.iOS)
The library that I'm using (https://github.com/gshackles/FloatLabeledEntry) indeed has Register attribute with spaces in the name applied to a class:
[Register ("Float Labeled Text Field"), DesignTimeVisible (true)]
public class FloatLabeledTextField : UITextField
When targeting simulator it compiles and works well.
This appears to be an error in the FloatLabeledEntry, not in Xamarin.iOS itself. The warning (MT4146) is correct that whitespace is not allowed in the Register attribute, so that is something that would need to be fixed by the developer of the Library being used.
The reason the error doesn't appear in the simulator is that the simulator uses a JIT compiler, while the device uses an AOT compiler. They also use different registrars by default, so the error will show up at build time for device, but would be delayed on the simulator until the program actually tries to call it.
It looks like our documentation is currently missing an entry for MT4146, so we will fix that.
in v1.1.1 of FloatLabeledEntry this issue is fixed i.e. spaces removed from Register attribute so issue is resolved.
This was merged in master https://github.com/xamarin/xamarin-macios/commit/cf14456cd58105342a467bcfd2ac7314e02401b2