diff --git a/docs/website/Makefile b/docs/website/Makefile index 86eaff250f..260fcf0cbe 100644 --- a/docs/website/Makefile +++ b/docs/website/Makefile @@ -5,14 +5,14 @@ XAMARIN_ANALYSIS_DOC = xamarin-analysis-doc-tool/bin/Debug diff: -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/mtouch-errors/index.md mtouch-errors.md - -diff -u $(WEBSITE_DOCS)/guides/ios/advanced_topics/binding_objective-c/binding_objc_libs/index.md binding_objc_libs.md - -diff -u $(WEBSITE_DOCS)/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide/index.md binding_types_reference_guide.md + -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/objective-c-libraries/index.md binding_objc_libs.md + -diff -u $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/binding-types-reference/index.md binding_types_reference_guide.md -diff -u $(WEBSITE_DOCS)/guides/ios/troubleshooting/xamarin-ios-analysis/index.md xamarin-ios-analysis.md all: xamarin-analysis-doc cp mtouch-errors.md $(WEBSITE_DOCS)/guides/ios/troubleshooting/mtouch-errors/index.md - cp binding_objc_libs.md $(WEBSITE_DOCS)/guides/ios/advanced_topics/binding_objective-c/binding_objc_libs/index.md - cp binding_types_reference_guide.md $(WEBSITE_DOCS)/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide/index.md + cp binding_objc_libs.md $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/objective-c-libraries/index.md + cp binding_types_reference_guide.md $(WEBSITE_DOCS)/guides/cross-platform/macios/binding/binding-types-reference/index.md cp xamarin-ios-analysis.md $(WEBSITE_DOCS)/guides/ios/troubleshooting/xamarin-ios-analysis/index.md xamarin-analysis-doc: diff --git a/docs/website/binding_objc_libs.md b/docs/website/binding_objc_libs.md index 80f0898523..40e190b5e9 100644 --- a/docs/website/binding_objc_libs.md +++ b/docs/website/binding_objc_libs.md @@ -1,16 +1,21 @@ -id:{8A832A76-A770-1A7C-24BA-B3E6F57617A0} -title:Binding Objective-C Libraries -samplecode:[Binding Sample](/samples/BindingSample/) +--- +id: 8A832A76-A770-1A7C-24BA-B3E6F57617A0 +title: Binding Objective-C Libraries +samplecode: + - title: "Binding Sample" + url: /samples/BindingSample/ +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) [//]: # (Modifications outside of xamarin-macios/master will be lost on future updates) -When working on iOS, you might encounter cases where you want to +When working with Xamarin.iOS or Xamarin.Mac, you might encounter cases where you want to consume a third-party Objective-C library. In those situations, you -can use Xamarin.iOS's Binding Projects to create a C# binding to the +can use Xamarin Binding Projects to create a C# binding to the native Objective-C libraries. The project uses the same tools that we -use to bring the iOS APIs to C#. +use to bring the iOS and Mac APIs to C#. This document describes how to bind Objective-C APIs, if you are binding just C APIs, you should use the standard .NET mechanism for @@ -20,31 +25,51 @@ Details on how to statically link a C library are available on the page. See our companion [Binding Types Reference -Guide](/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide). +Guide](/guides/cross-platform/macios/binding/binding-types-reference/). Additionally, if you want to learn more about what happens under the hood, check our -[Binding Details](/guides/ios/advanced_topics/binding_objective-c/binding_details) +[Binding Overview](/guides/cross-platform/macios/binding/overview/) page. - **Sample Code** +Bindings can be built for both iOS and Mac libraries. +This page describes how to work on an iOS binding, however +Mac bindings are very similar. + +**Sample Code for iOS** You can use the -[BindingSample](https://github.com/xamarin/monotouch-samples/tree/master/BindingSample) +[iOS Binding Sample](https://github.com/xamarin/monotouch-samples/tree/master/BindingSample) project to experiment with bindings. -
Note: This is only supported in Xamarin Studio on Mac.
- - - - # Getting Started - -

The easiest way to create a binding is to create a Xamarin.iOS Binding Project. You can do this from Xamarin Studio on Mac by selecting the project type, iOS Binding Project:

-
+[[ide name="xs"]] - -

The easiest way to create a binding is to create a Xamarin.iOS Binding Project. You can do this from Visual Studio on Windows by selecting the project type, iOS Binding Project:

-
+ +The easiest way to create a binding is to create a Xamarin.iOS Binding Project. +You can do this from Xamarin Studio on Mac by selecting the project type, +**iOS > Library > Bindings Library**: + + +[![](Images/00-sml.png "Do this from Xamarin Studio on Mac by selecting the project type, iOS Library Bindings Library")](Images/00.png) + + +[[/ide]] + +[[ide name="vs"]] + + +The easiest way to create a binding is to create a Xamarin.iOS Binding Project. +You can do this from Visual Studio on Windows by selecting the project type, +**Visual C# > iOS > Bindings Library (iOS)**: + + +[![](Images/00VS-sml.png "iOS Bindings Library iOS")](Images/00VS.png) + +> ⚠️ Note: Binding Projects for **Xamarin.Mac** are only supported in +> Visual Studio for Mac. + + +[[/ide]] The generated project contains a small template that you can edit, it contains two files: `ApiDefinition.cs` and `StructsAndEnums.cs`. @@ -58,9 +83,7 @@ limited to C# interfaces and C# delegate declarations. The definitions that are required by the interfaces and delegates. This includes enumeration values and structures that your code might use. - - - + # Binding an API To do a comprehensive binding, you will want to understand the Objective-C @@ -114,14 +137,14 @@ To produce a complete binding, you will typically deal with four components: - The API definition file (`ApiDefinition.cs` in the template). -- Optional: any enums, types, structs required by the API definition file (`StructsAndEnums.cs` in the template). -- Optional: extra sources that might expand the generated binding, or provide a more C# friendly API (any C# files that you add to the project). +- Optional: any enums, types, structs required by the API definition file (`StructsAndEnums.cs` in the template). +- Optional: extra sources that might expand the generated binding, or provide a more C# friendly API (any C# files that you add to the project). - The native library that you are binding. This chart shows the relationship between the files: - [ ![](Images/Screen_Shot_2012-02-08_at_3.33.07_PM.png)](Images/Screen_Shot_2012-02-08_at_3.33.07_PM.png) + [ ![](Images/Screen_Shot_2012-02-08_at_3.33.07_PM.png "This chart shows the relationship between the files")](Images/Screen_Shot_2012-02-08_at_3.33.07_PM.png) The API Definition file: will only contain namespaces and interface definitions (with any members that an interface can contain) and @@ -178,7 +201,7 @@ the extension ".a". When you do this, Xamarin Studio will add two files: the `.a` file and an automatically populated C# file that contains information about what the native library contains: - [ ![](Images/Screen_Shot_2012-02-08_at_3.45.06_PM.png)](Images/Screen_Shot_2012-02-08_at_3.45.06_PM.png) + [ ![](Images/Screen_Shot_2012-02-08_at_3.45.06_PM.png "Native libraries by convention start with the word lib and end with the extension .a")](Images/Screen_Shot_2012-02-08_at_3.45.06_PM.png) The contents of the `libMagicChord.linkwith.cs` file has information about how this library can be used and instructs your IDE to package this binary into @@ -201,7 +224,7 @@ Sometimes you might find that you need a few enumeration values, delegate definitions or other types. Do not place those in the API definitions file, as this is merely a contract - + # The API definition file @@ -220,7 +243,7 @@ But since we are using the interface as a skeleton to generate a class we had to resort to decorating various parts of the contract with attributes to drive the binding. - + ## Binding Methods The simplest binding you can do is to bind a method. Just declare a @@ -275,7 +298,7 @@ When exporting a reference type, with the `[Export]` keyword you can also specify the allocation semantics. This is necessary to ensure that no data is leaked. - + ## Binding Properties Just like methods, Objective-C properties are bound using the @@ -310,7 +333,7 @@ This then binds "isMenuVisible" and "setMenuVisible:". Optionally, a property ca ``` [Category, BaseType(typeof(UIView))] interface UIView_MyIn -{ +{ [Export ("name")] string Name(); @@ -400,7 +423,7 @@ interface MyMutableTree { } ``` - + ## Binding Constructors @@ -408,10 +431,10 @@ interface MyMutableTree { The **btouch-native** tool will automatically generate fours constructors in your class, for a given class `Foo`, it generates: -- `Foo ()`: the default constructor (maps to Objective-C's "init" constructor) -- `Foo (NSCoder)`: the constructor used during deserialization of NIB files (maps to Objective-C's "initWithCoder:" constructor). -- `Foo (IntPtr handle)`: the constructor for handle-based creation, this is invoked by the runtime when the runtime needs to expose a managed object from an unmanaged object. -- `Foo (NSEmptyFlag)`: this is used by derived classes to prevent double initialization. +- `Foo ()`: the default constructor (maps to Objective-C's "init" constructor) +- `Foo (NSCoder)`: the constructor used during deserialization of NIB files (maps to Objective-C's "initWithCoder:" constructor). +- `Foo (IntPtr handle)`: the constructor for handle-based creation, this is invoked by the runtime when the runtime needs to expose a managed object from an unmanaged object. +- `Foo (NSEmptyFlag)`: this is used by derived classes to prevent double initialization. For constructors that you define, they need to be declared using the @@ -425,7 +448,7 @@ use: IntPtr Constructor (CGRect frame); ``` - + ## Binding Protocols @@ -524,7 +547,7 @@ consume protocols: // Interface that contains only the required methods interface IMyProtocol: INativeObject, IDisposable { - [Export (“say:”)] + [Export ("say:")] void Say (string msg); } @@ -562,7 +585,7 @@ the methods. If you want to use the protocol definitions in your API, you will need to write skeleton empty interfaces in your API definition. If you want to use the MyProtocol in an API, you would need to do this: - + ``` [BaseType (typeof (NSObject))] [Model, Protocol] @@ -593,12 +616,12 @@ exist, that is why you need to provide an empty interface. Whenever you implement one of the interfaces generated for the protocols, like this: - + ``` class MyDelegate : NSObject, IUITableViewDelegate { - nint IUITableViewDelegate.GetRowHeight (nint row) { - return 1; - } + nint IUITableViewDelegate.GetRowHeight (nint row) { + return 1; + } } ``` @@ -609,17 +632,17 @@ exported with the proper name, so it is equivalent to this: ``` class MyDelegate : NSObject, IUITableViewDelegate { - [Export (“getRowHeight:”)] - nint IUITableViewDelegate.GetRowHeight (nint row) { - return 1; - } + [Export ("getRowHeight:")] + nint IUITableViewDelegate.GetRowHeight (nint row) { + return 1; + } } ``` It does not matter if the interface is implemented -implicitly or explicitly. +implicitly or explicitly. - + ## Binding Class Extensions @@ -636,8 +659,8 @@ For example, in Xamarin.iOS we bound the extension methods that are defined on ``` [BaseType (typeof (UIResponder))] interface UIView { - [Bind ("drawAtPoint:withFont:")] - SizeF DrawString ([Target] string str, CGPoint point, UIFont font); + [Bind ("drawAtPoint:withFont:")] + SizeF DrawString ([Target] string str, CGPoint point, UIFont font); } ``` @@ -654,12 +677,12 @@ For example, in Xamarin.iOS we bound the extension methods that are defined on ``` [Category, BaseType (typeof (NSString))] interface NSStringDrawingExtensions { - [Export ("drawAtPoint:withFont:")] - CGSize DrawString (CGPoint point, UIFont font); + [Export ("drawAtPoint:withFont:")] + CGSize DrawString (CGPoint point, UIFont font); } ``` - + ## Binding Objective-C Argument Lists @@ -672,7 +695,7 @@ An Objective-C message looks like this: ``` - (void) appendWorkers:(XWorker *) firstWorker, ... - NS_REQUIRES_NIL_TERMINATION ; + NS_REQUIRES_NIL_TERMINATION ; ``` To invoke this method from C# you will want to create a signature like @@ -705,7 +728,7 @@ public void AppendWorkers(params Worker[] workers) } ``` - + ## Binding Fields @@ -776,14 +799,14 @@ interface LonelyClass { } ``` - + ## Binding Enums You can add `enum` directly in your binding files to makes it easier to use them inside API definitions - without using a different source -file (that needs to be compiled in both the bindings and the final +file (that needs to be compiled in both the bindings and the final project). Example: @@ -813,7 +836,7 @@ enum NSRunLoopMode { [Field ("NSRunLoopCommonModes")] Common, - + [Field (null)] Other = 1000 } @@ -821,7 +844,7 @@ enum NSRunLoopMode { interface MyType { [Export ("performForMode:")] void Perform (NSString mode); - + [Wrap ("Perform (mode.GetConstant ())")] void Perform (NSRunLoopMode mode); } @@ -835,8 +858,8 @@ However this would limit subclassing the type as the nicer API alternative uses a `[Wrap]` attribute. Those generated methods are not `virtual`, i.e. you won't be able to override them - which may, or not, be a good choice. -An alternative is to mark the original, `NSString`-based, definition as -`[Protected]`. This will allow subclassing to work, when required, and +An alternative is to mark the original, `NSString`-based, definition as +`[Protected]`. This will allow subclassing to work, when required, and the wrap'ed version will still work and call the overriden method. @@ -884,6 +907,8 @@ CAScroll [] SupportedScrollModes { get; set; } Please see [[BindAs] documentation](/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide#BindAsAttribute) to see supported conversion types. + + ## Binding Notifications @@ -891,11 +916,11 @@ Notifications are messages that are posted to the `NSNotificationCenter.DefaultCenter` and are used as a mechanism to broadcast messages from one part of the application to another. Developers subscribe to notifications typically using the -[NSNotificationCenter](http://iosapi.xamarin.com/?link=T%3aMonoTouch.Foundation.NSNotificationCenter)'s -[AddObserver](http://iosapi.xamarin.com/?link=T%3aMonoTouch.Foundation.NSNotificationCenter%2fM%2fAddObserver) +[NSNotificationCenter](/api/type/Foundation.NSNotificationCenter/)'s +[AddObserver](/api/type/Foundation.NSNotificationCenter/M/AddObserver/) method. When an application posts a message to the notification center, it typically contains a payload stored in the -[NSNotification.UserInfo](http://iosapi.xamarin.com/?link=P%3aMonoTouch.Foundation.NSNotification.UserInfo) +[NSNotification.UserInfo](/api/property/Foundation.NSNotification.UserInfo/) dictionary. This dictionary is weakly typed, and getting information out of it is error prone, as users typically need to read in the documentation which keys are available on the dictionary and the types @@ -942,7 +967,7 @@ public class MyClass { Users of your code can then easily subscribe to notifications posted to the -[NSDefaultCenter](http://iosapi.xamarin.com/?link=P%3aMonoTouch.Foundation.NSNotificationCenter.DefaultCenter) +[NSDefaultCenter](/api/property/Foundation.NSNotificationCenter.DefaultCenter/) by using code like this: ``` @@ -960,7 +985,7 @@ token.Dispose (); Or you can call -[NSNotification.DefaultCenter.RemoveObserver](http://iosapi.xamarin.com/?link=M%3aMonoTouch.Foundation.NSNotificationCenter.RemoveObserver(MonoTouch.Foundation.NSObject)) +[NSNotification.DefaultCenter.RemoveObserver](/api/member/Foundation.NSNotificationCenter.RemoveObserver/p/Foundation.NSObject/) and pass the token. If your notification contains parameters, you should specify a helper `EventArgs` interface, like this: @@ -987,7 +1012,7 @@ interface MyScreenChangedEventArgs { The above will generate a `MyScreenChangedEventArgs` class with the `ScreenX` and `ScreenY` properties that will fetch the data from the -[NSNotification.UserInfo](http://iosapi.xamarin.com/?link=P%3aMonoTouch.Foundation.NSNotification.UserInfo) +[NSNotification.UserInfo](/api/property/Foundation.NSNotification.UserInfo/) dictionary using the keys "ScreenXKey" and "ScreenYKey" respectively and apply the proper conversions. The `[ProbePresence]` attribute is used for the generator to probe if the key is set in the `UserInfo`, @@ -1002,7 +1027,7 @@ var token = MyClass.NotificationsObserveScreenChanged ((notification) => { }); ``` - + ## Binding Categories @@ -1103,7 +1128,7 @@ interface SocialNetworking { } ``` - + ## Binding Blocks @@ -1182,18 +1207,18 @@ Example: ``` [Export ("loadfile:completed:")] - [Async] - void LoadFile (string file, Action completed); +[Async] +void LoadFile (string file, Action completed); ``` The above code will generate both the LoadFile method, as well as: - + ``` [Export ("loadfile:completed:")] - Task LoadFileAsync (string file); +Task LoadFileAsync (string file); ``` @@ -1230,7 +1255,7 @@ there are scenarios where the value might not be set. To do this, you need to do a few things: * Create a strongly typed class, that subclasses - [DictionaryContainer](http://iosapi.xamarin.com/?link=T%3aMonoTouch.Foundation.DictionaryContainer) and provides the various getters and setters for each property. + [DictionaryContainer](/api/type/Foundation.DictionaryContainer/) and provides the various getters and setters for each property. * Declare overloads for the methods taking `NSDictionary` to take the new strongly typed version. You can create the strongly typed class either manually, or use the @@ -1248,8 +1273,8 @@ public class XyzOptions : DictionaryContainer { #if !COREBUILD public XyzOptions () : base (new NSMutableDictionary ()) {} public XyzOptions (NSDictionary dictionary) : base (dictionary){} - - public nfloat? Volume { + + public nfloat? Volume { get { return GetFloatValue (XyzOptionsKeys.VolumeKey); } set { SetNumberValue (XyzOptionsKeys.VolumeKey, value); } } @@ -1262,7 +1287,7 @@ public class XyzOptions : DictionaryContainer { ``` You then should provide a wrapper method that surfaces the high-level -API, on top of the low-level API. +API, on top of the low-level API. ``` [BaseType (typeof (NSObject))] @@ -1353,14 +1378,14 @@ field (that is not the name of the property with the suffix `Key`), you can decorate the property with an `Export` attribute with the name that you want to use. - + # Type mappings -This section covers how Objective-C types are mapped to C# types. - - +This section covers how Objective-C types are mapped to C# types. + + ## Simple Types @@ -1570,7 +1595,7 @@ Objective-C and CocoaTouch world to the Xamarin.iOS world: - + ## Arrays @@ -1605,7 +1630,7 @@ the actual type of the objects contained in the array. In cases where you can not track down the actual most derived type contained in the array, you can use `NSObject []` as the return value. - + ## Selectors @@ -1687,7 +1712,7 @@ class DialogPrint : UIViewController { } ``` - + ## Strings @@ -1706,7 +1731,7 @@ annotate the parameter with the [[PlainString]](/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide#PlainString) attribute. - + ## out/ref parameters @@ -1735,7 +1760,7 @@ void Something (nint foo, out NSError error); void SomeString (ref NSObject byref); ``` - + ## Memory management attributes @@ -1756,12 +1781,12 @@ semantics available are: - Retain: - + ## Style Guidelines - + ### Using [Internal] @@ -1778,7 +1803,7 @@ generator, for example some advanced scenarios might expose types that are not bound and you want to bind in your own way, and you want to wrap those types yourself in your own way. - + # Event Handlers and Callbacks @@ -1814,11 +1839,11 @@ Considering the following setup: ``` [BaseType (typeof (NSObject))] interface MyClass { - [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed] - NSObject WeakDelegate { get; set; } + [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed] + NSObject WeakDelegate { get; set; } - [Wrap ("WeakDelegate")][NullAllowed] - MyClassDelegate Delegate { get; set; } + [Wrap ("WeakDelegate")][NullAllowed] + MyClassDelegate Delegate { get; set; } } [BaseType (typeof (NSObject))] @@ -1830,8 +1855,8 @@ interface MyClassDelegate { To wrap the class you must: -- In your host class, add to your `[BaseType]` declaration the type that is acting as its delegate and the C# name that you exposed. In our example above those are "typeof (MyClassDelegate)" and "WeakDelegate" respectively. -- In your delegate class, on each method that has more than two parameters, you need to specify the type that you want to use for the automatically generated EventArgs class. +- In your host class, add to your `[BaseType]` declaration the type that is acting as its delegate and the C# name that you exposed. In our example above those are "typeof (MyClassDelegate)" and "WeakDelegate" respectively. +- In your delegate class, on each method that has more than two parameters, you need to specify the type that you want to use for the automatically generated EventArgs class. The binding generator is not limited to wrapping only a single event @@ -1908,7 +1933,7 @@ DefaultValue will hardcode a return value, while `[DefaultValueFromArgument]` is used to specify which input argument will be returned. - + # Enumerations and Base Types @@ -1919,7 +1944,7 @@ this, put your enumerations and core types into a separate file and include this as part of one of the extra files that you provide to btouch. - + # Linking the Dependencies @@ -1962,7 +1987,7 @@ does not preserve the metadata required to support categories (the linker/compiler dead code elimination strips it) which you need at runtime for Xamarin.iOS. - + # Assisted References @@ -2020,7 +2045,7 @@ class Demo { } ``` - + # Inheriting Protocols diff --git a/docs/website/binding_types_reference_guide.md b/docs/website/binding_types_reference_guide.md index 23bbbb4906..9fa6493297 100644 --- a/docs/website/binding_types_reference_guide.md +++ b/docs/website/binding_types_reference_guide.md @@ -1,5 +1,8 @@ -id:{C6618E9D-07FA-4C84-D014-10DAC989E48D} -title:Binding Types Reference Guide +--- +id: C6618E9D-07FA-4C84-D014-10DAC989E48D +title: Binding Types Reference Guide +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) @@ -12,7 +15,7 @@ Xamarin.iOS and Xamarin.Mac API contracts are written in C# mostly as interface definitions that define the way that Objective-C code is surfaced to C#. The process involves a mix of interface declarations plus some basic type definitions that the API contract might require. For an introduction to binding -types, see our companion guide [Binding Objective-C Libraries](/guides/ios/advanced_topics/binding_objective-c/binding_objc_libs/). +types, see our companion guide [Binding Objective-C Libraries](/guides/cross-platform/macios/binding/objective-c-libraries/). # Type Definitions @@ -58,7 +61,7 @@ interface UITextField : UITextInput { You can control many other aspects of the code generation by applying other attributes to the interface as well as configuring the BaseType attribute. - + ## Generating Events @@ -169,8 +172,7 @@ public partial class UIImagePickerImagePickedEventArgs : EventArgs { It then exposes the following in the UIImagePickerController class: ``` -public event EventHandler FinishedPickingImage { add; remove; } - +public event EventHandler FinishedPickingImage { add; remove; } ``` Model methods that return a value are bound differently. Those require both a @@ -197,7 +199,7 @@ directs the generator to return the value of the specified parameter in the call or the `NoDefaultValue` parameter that instructs the generator that there is no default value. - + ## BaseTypeAttribute @@ -217,9 +219,6 @@ public class BaseTypeAttribute : Attribute { } ``` - - - ### BaseType.Name You use the `Name` property to control the name that this type will bind to in @@ -242,8 +241,6 @@ The specified name is specified is used as the value for the generated name is used as the value for the `Register` attribute in the generated output. - - ### BaseType.Events and BaseType.Delegates @@ -263,8 +260,8 @@ weakly-typed delegate that you want to wrap, and the Events array contains one type for each type that you want to associate with it. ``` -[BaseType (typeof (NSObject), - Delegates=new string [] { "WeakDelegate" }, +[BaseType (typeof (NSObject), + Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIAccelerometerDelegate)})] public interface UIAccelerometer { } @@ -275,7 +272,7 @@ public interface UIAccelerometerDelegate { } ``` - + ### BaseType.KeepRefUntil @@ -293,9 +290,9 @@ Xamarin.iOS: ``` [BaseType (typeof (NSObject), KeepRefUntil="Dismissed")] -[BaseType (typeof (UIView), - KeepRefUntil="Dismissed", - Delegates=new string [] { "WeakDelegate" }, +[BaseType (typeof (UIView), + KeepRefUntil="Dismissed", + Delegates=new string [] { "WeakDelegate" }, Events=new Type [] {typeof(UIActionSheetDelegate)})] public interface UIActionSheet { } @@ -308,7 +305,7 @@ public interface UIActionSheetDelegate { } ``` - + ## DisableDefaultCtorAttribute @@ -319,7 +316,7 @@ the generator from producing the default constructor. Use this attribute when you need the object to be initialized with one of the other constructors in the class. - + ## PrivateDefaultCtorAttribute @@ -329,9 +326,7 @@ default constructor as private. This means that you can still instantiate object of this class internally from your extension file, but it just wont be accessible to users of your class. - - - + ## CategoryAttribute Use this attribute on a type definition to bind Objective-C @@ -402,7 +397,7 @@ interface FooObject_Extensions { } ``` -This is incorrect because in order to use the `BoolMethod` extension you need an instance of `FooObject` but you are binding an ObjC **static** extension, this is a side effect due to the fact of how C# extension methods are implemented. +This is incorrect because in order to use the `BoolMethod` extension you need an instance of `FooObject` but you are binding an ObjC **static** extension, this is a side effect due to the fact of how C# extension methods are implemented. The only way to use the above definitions is by the following ugly code: @@ -424,9 +419,7 @@ interface FooObject { We will issue a warning (BI1117) whenever we find a `[Static]` member inside a `[Category]` definition. If you really want to have `[Static]` members inside your `[Category]` definitions you can silence the warning by using `[Category (allowStaticMembers: true)]` or by decorating either your member or `[Category]` interface definition with `[Internal]`. - - - + ## StaticAttribute When this attribute is applied to a class it will just generate a static @@ -451,9 +444,7 @@ public partial class CBAdvertisement { } ``` - - - + # Model Definitions ###Protocol definitions/Model @@ -467,9 +458,9 @@ This in general means that when you subclass a class that has been flagged with the `ModelAttribute`, you should not call the base method. Calling that method will throw an exception, you are supposed to implement the entire behavior -on your subclass for any methods you override. - +on your subclass for any methods you override. + ## AbstractAttribute By default, members that are part of a protocol are not mandatory. This @@ -495,7 +486,7 @@ public interface UITableViewDataSource { } ``` - + ## DefaultValueAttribute @@ -575,14 +566,11 @@ parameter. -See -also: [NoDefaultValueAttribute](#NoDefaultValueAttribute), [DefaultValueAttribute](#DefaultValueAttribute) - - +See also: [NoDefaultValueAttribute](#NoDefaultValueAttribute), [DefaultValueAttribute](#DefaultValueAttribute) ## IgnoredInDelegateAttribute -Sometimes it makes sense not to expose an event or delegate property from a +Sometimes it makes sense not to expose an event or delegate property from a Model class into the host class so adding this attribute will instruct the generator to avoid the generation of any method decorated with it. @@ -592,15 +580,12 @@ generator to avoid the generation of any method decorated with it. public interface UIImagePickerControllerDelegate { [Export ("imagePickerController:didFinishPickingImage:editingInfo:"), EventArgs ("UIImagePickerImagePicked")] void FinishedPickingImage (UIImagePickerController picker, UIImage image, NSDictionary editingInfo); - + [Export ("imagePickerController:didFinishPickingImage:"), IgnoredInDelegate)] // No event generated for this method void FinishedPickingImage (UIImagePickerController picker, UIImage image); } ``` - - - ## DelegateNameAttribute @@ -625,14 +610,10 @@ declaration: public delegate float NSAnimationProgress (MonoMac.AppKit.NSAnimation animation, float progress); ``` - - - - ## DelegateApiNameAttribute This attribute is used to allow the generator to change the name of the property generated -in the host class. Sometimes it is useful when the name of the FooDelegate class method +in the host class. Sometimes it is useful when the name of the FooDelegate class method makes sense for the Delegate class, but would look odd in the host class as a property. Also this is really useful (and needed) when you have two or more overload methods that makes @@ -657,9 +638,7 @@ declaration in the host class: public Func ComputeAnimationCurve { get; set; } ``` - - - + ## EventArgsAttribute For events that take more than one parameter (in Objective-C the convention @@ -693,13 +672,10 @@ public partial class UIImagePickerImagePickedEventArgs : EventArgs { It then exposes the following in the UIImagePickerController class: ``` -public event EventHandler FinishedPickingImage { add; remove; } - +public event EventHandler FinishedPickingImage { add; remove; } ``` - - - + ## EventNameAttribute This attribute is used to allow the generator to change the name of an event @@ -723,7 +699,7 @@ var webView = new UIWebView (...); webView.LoadFinished += delegate { Console.WriteLine ("done!"); } ``` - + ## ModelAttribute @@ -744,7 +720,7 @@ class. Specifies that the method on the model does not provide a default return value. -This works with the Objective-C runtime by responding +This works with the Objective-C runtime by responding "false" to the Objective-C runtime request to determine if the specified selector is implemented in this class. @@ -777,7 +753,7 @@ using the Model attribute. interface MyProtocol { // Use [Abstract] when the method is defined in the @required section // of the protocol definition in Objective-C - [Abstract] + [Abstract] [Export ("say:")] void Say (string msg); @@ -801,7 +777,7 @@ class MyProtocol : IMyProtocol { // Interface that contains only the required methods interface IMyProtocol: INativeObject, IDisposable { - [Export (“say:”)] + [Export ("say:")] void Say (string msg); } @@ -809,7 +785,7 @@ interface IMyProtocol: INativeObject, IDisposable { static class IMyProtocol_Extensions { public static void Optional (this IMyProtocol this, string msg); } -} +} ``` The **class implementation** provides a complete abstract class that you can override individual methods of and get full type safety. But due to C# not supporting multiple inheritance, there are scenarios where you might require a different base class, but still want to implement an interface. @@ -840,7 +816,7 @@ would need to do this: interface MyProtocol { // Use [Abstract] when the method is defined in the @required section // of the protocol definition in Objective-C - [Abstract] + [Abstract] [Export ("say:")] void Say (string msg); @@ -879,10 +855,10 @@ exported with the proper name, so it is equivalent to this: ``` class MyDelegate : NSObject, IUITableViewDelegate { -[Export ("getRowHeight:")] - nint IUITableViewDelegate.GetRowHeight (nint row) { - return 1; - } + [Export ("getRowHeight:")] + nint IUITableViewDelegate.GetRowHeight (nint row) { + return 1; + } } ``` @@ -911,7 +887,7 @@ interface Robot : SpeakProtocol { } ``` - + # Member Definitions @@ -919,7 +895,7 @@ interface Robot : SpeakProtocol { The attributes in this section are applied to individual members of a type: properties and method declarations. - + ## AlignAttribute @@ -940,7 +916,7 @@ public interface GLKBaseEffect { } ``` - + ## AppearanceAttribute @@ -983,8 +959,6 @@ public partial class UIToolbar { } ``` - - ## AutoReleaseAttribute (Xamarin.iOS 5.4) @@ -1006,9 +980,6 @@ sort of background downloader that is always alive and waiting for work, the images would never be released. - - - ## ForcedTypeAttribute The `ForcedTypeAttribute` is used to enforce the creation of a managed type even @@ -1021,7 +992,7 @@ of the native method, for example take the following Objective-C definition from `- (NSURLSessionDownloadTask *)downloadTaskWithRequest:(NSURLRequest *)request` It clearly states that it will return an `NSURLSessionDownloadTask` instance, but yet it -**returns** a `NSURLSessionTask`, which is a superclass and thus not convertible to +**returns** a `NSURLSessionTask`, which is a superclass and thus not convertible to `NSURLSessionDownloadTask`. Since we are in a type-safe context an `InvalidCastException` will happen. @@ -1043,11 +1014,9 @@ by default `[ForcedType (owns: true)]`. The owns parameter is used to follow the [Ownership Policy](https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html) for **Core Foundation** objects. -The `ForcedTypeAttribute` is only valid on `parameters`, `properties` and `return value`. +The `ForcedTypeAttribute` is only valid on `parameters`, `properties` and `return value`. - - ## BindAsAttribute @@ -1159,10 +1128,6 @@ CAScroll? [] GetScrollModes (CGRect [] rects) { ... } The `rects` parameter will be encapsulated into a `NSArray` that contains an `NSValue` for each `CGRect` and in return you will get an array of `CAScroll?` which has been created using the values of the returned `NSArray` containing `NSStrings`. - - - - ## BindAttribute The `Bind` attribute has two uses one when applied to a method or property @@ -1257,14 +1222,14 @@ Task LoadFile (string file); ``` If the last parameter of the callback is an `NSError`, then -then the generated `Async` method will check if the value is not +the generated `Async` method will check if the value is not null, and if that is the case, the generated async method will set the task exception. ``` [Export ("upload:onComplete:")] [Async] -void Upload (string file, Action onComplete); +void Upload (string file, Action onComplete); ``` The above generates the following async method: @@ -1274,7 +1239,7 @@ Task UploadAsync (string file); ``` And on error, the resulting Task will have the exception -set to an `NSErrorException` that wraps the resulting `NSError`. +set to an `NSErrorException` that wraps the resulting `NSError`. ### AsyncAttribute.ResultType @@ -1282,7 +1247,7 @@ set to an `NSErrorException` that wraps the resulting `NSError`. Use this property to specify the value for the returning `Task` object. This parameter takes an existing type, thus it -needs to be defined in one of your core api definitions. +needs to be defined in one of your core api definitions. ### AsyncAttribute.ResultTypeName @@ -1290,7 +1255,7 @@ needs to be defined in one of your core api definitions. Use this property to specify the value for the returning `Task` object. This parameter takes the name of your desired type name, the generator will produce a series of properties, -one for each parameter that the callback takes. +one for each parameter that the callback takes. ### AsyncAttribute.MethodName @@ -1299,7 +1264,7 @@ one for each parameter that the callback takes. +and append the text "Async", you can use this to change this default. ## DisableZeroCopyAttribute @@ -1327,7 +1292,7 @@ The following shows two such properties in Objective-C: @property(nonatomic,assign) NSString *name2; ``` - + ## DisposeAttribute @@ -1335,7 +1300,7 @@ The following shows two such properties in Objective-C: When you apply the `DisposeAttribute` to a class, you provide a code snippet that will be added to the `Dispose()` method implementation of the class. -Since the `Dispos`e method is automatically generated by the `bmac-native` and `btouch-native` +Since the `Dispose` method is automatically generated by the `bmac-native` and `btouch-native` tools, you need to use the `Dispose` attribute to inject some code in the generated `Dispose` method implementation. @@ -1348,7 +1313,7 @@ interface DatabaseConnection { } ``` - + ## ExportAttribute @@ -1380,12 +1345,12 @@ public class ExportAttribute : Attribute { The [selector](http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/objectivec/Chapters/ocSelectors.html) and it represents the underlying Objective-C name of the method or property that is being bound. - + ### ExportAttribute.ArgumentSemantic - + ## FieldAttribute @@ -1446,6 +1411,7 @@ wrapper that exposes the underlying functionality. For example: +``` [Internal] [Export ("setValue:forKey:"); void _SetValueForKey (NSObject value, NSObject key); @@ -1453,7 +1419,7 @@ void _SetValueForKey (NSObject value, NSObject key); [Internal] [Export ("getValueForKey:")] NSObject _GetValueForKey (NSObject key); - +``` Then, in your supporting file, you could have some code like this: @@ -1475,7 +1441,7 @@ This attribute flags the backing field for a property to be annotated with the .NET `[ThreadStatic]` attribute. This is useful if the field is a thread static variable. - + ## MarshalNativeExceptions (Xamarin.iOS 6.0.6) @@ -1490,7 +1456,7 @@ if a signature isn't supported when native linking of an app that uses the binding fails with a missing monotouch_*_objc_msgSend* symbol), but more can be added at request. - + ## NewAttribute @@ -1501,7 +1467,7 @@ generate the "new" keyword in front of the declaration. It is used to avoid compiler warnings when the same method or property name is introduced in a subclass that already existed in a base class. - + ## NotificationAttribute @@ -1542,11 +1508,11 @@ public class MyClass { Users of your code can then easily subscribe to notifications posted to the -[NSDefaultCenter](http://iosapi.xamarin.com/?link=P%3aMonoTouch.Foundation.NSNotificationCenter.DefaultCenter) +[NSDefaultCenter](/api/property/Foundation.NSNotificationCenter.DefaultCenter/) by using code like this: ``` -var token = MyClass.Notifications.ObserverDidStart ((notification) => { +var token = MyClass.Notifications.ObserverDidStart ((notification) => { Console.WriteLine ("Observed the 'DidStart' event!"); }); ``` @@ -1554,7 +1520,7 @@ var token = MyClass.Notifications.ObserverDidStart ((notification) => { Or to set a specific object to observe. If you pass `null` to `objectToObserve` this method will behave just like its other peer. ``` -var token = MyClass.Notifications.ObserverDidStart (objectToObserve, (notification) => { +var token = MyClass.Notifications.ObserverDidStart (objectToObserve, (notification) => { Console.WriteLine ("Observed the 'DidStart' event on objectToObserve!"); }); ``` @@ -1567,7 +1533,7 @@ token.Dispose (); ``` -Or you can call [NSNotification.DefaultCenter.RemoveObserver](http://iosapi.xamarin.com/?link=M%3aMonoTouch.Foundation.NSNotificationCenter.RemoveObserver(MonoTouch.Foundation.NSObject)) +Or you can call [NSNotification.DefaultCenter.RemoveObserver](/api/member/Foundation.NSNotificationCenter.RemoveObserver/p/Foundation.NSObject//) and pass the token. If your notification contains parameters, you should specify a helper `EventArgs` interface, like this: @@ -1594,7 +1560,7 @@ interface MyScreenChangedEventArgs { The above will generate a `MyScreenChangedEventArgs` class with the `ScreenX` and `ScreenY` properties that will fetch the data from the -[NSNotification.UserInfo](http://iosapi.xamarin.com/?link=P%3aMonoTouch.Foundation.NSNotification.UserInfo) +[NSNotification.UserInfo](/api/property/Foundation.NSNotification.UserInfo/) dictionary using the keys **ScreenXKey** and **ScreenYKey** respectively and apply the proper conversions. The `[ProbePresence]` attribute is used for the generator to probe if the key is set in the @@ -1616,7 +1582,7 @@ sometimes uses string constants. By default the `[Export]` attribute in your provided `EventArgs` class will use the specified name as a public symbol to be looked up at runtime. If this is not the case, and instead it is supposed to be looked up as a string constant then -pass the `ArgumentSemantic.Assign` value to the Export attribute. +pass the `ArgumentSemantic.Assign` value to the Export attribute. **New in Xamarin.iOS 8.4** @@ -1679,7 +1645,7 @@ void SetImage ([NullAllowed] UIImage image, State forState); Use this attribute to instruct the binding generator that the binding for this particular method should be flagged with an "override" keyword. - + ## PreSnippetAttribute @@ -1695,7 +1661,7 @@ Example: void Demo (); ``` - + ## PrologueSnippetAttribute @@ -1711,7 +1677,7 @@ Example: void Demo (); ``` - + ## PostGetAttribute @@ -1735,10 +1701,10 @@ Example: public interface NSOperation { [Export ("addDependency:")][PostGet ("Dependencies")] void AddDependency (NSOperation op); - + [Export ("removeDependency:")][PostGet ("Dependencies")] void RemoveDependency (NSOperation op); - + [Export ("dependencies")] NSOperation [] Dependencies { get; } } @@ -1749,7 +1715,7 @@ adding or removing dependencies from the `NSOperation` object, ensuring that we have a graph that represents the actual loaded objects, preventing both memory leaks as well as memory corruption. - + ## PostSnippetAttribute @@ -1765,7 +1731,7 @@ Example: void Demo (); ``` - + ## ProxyAttribute @@ -1776,7 +1742,7 @@ differentiated from user bindings. The effect of this attribute is to flag the object as being a `DirectBinding` object. For a scenario in Xamarin.Mac, you can see the [discussion on this bug](https://bugzilla.novell.com/show_bug.cgi?id=670844). - + ## RetainListAttribute @@ -1800,7 +1766,7 @@ class to the API. For an example see [foundation.cs](https://github.com/mono/maccore/blob/master/src/foundation.cs) and [NSNotificationCenter.cs](https://github.com/mono/maccore/blob/master/src/Foundation/NSNotificationCenter.cs) - + ## ReleaseAttribute (Xamarin.iOS 6.0) @@ -1822,7 +1788,7 @@ Additionally this attribute is propagated to the generated code, so that the Xamarin.iOS runtime knows it must retain the object upon returning to Objective-C from such a function. - + ## SealedAttribute @@ -1832,7 +1798,7 @@ attribute is not specified, the default is to generate a virtual method (either a virtual method, an abstract method or an override depending on how other attributes are used). - + ## StaticAttribute @@ -1841,7 +1807,7 @@ When the `Static` attribute is applied to a method or property this generates a static method or property. If this attribute is not specified, then the generator produces an instance method or property. - + ## TransientAttribute @@ -1852,7 +1818,7 @@ attribute is applied to a property, the generator does not create a backing field for this property, which means that the managed class does not keep a reference to the object. - + ## WrapAttribute @@ -1912,7 +1878,7 @@ to declare his intent and that he does not have to manually decorate the method with `Export`, since we did that work in the binding for the user: ``` -// This is the strong case, +// This is the strong case, class MyDelegate : DemoDelegate { override void Demo DoDemo () {} } @@ -1922,7 +1888,7 @@ var strongDemo = new Demo (); demo.Delegate = new MyDelegate (); ``` - + Another use of the `Wrap` attribute is to support strongly typed version of methods. For example: @@ -1951,7 +1917,6 @@ interface FooExplorer { } ``` - # Parameter Attributes This section describes the attributes that you can apply to the parameters in @@ -2015,7 +1980,7 @@ Allows the following code to be written: foo.LoadFiles (new NSUrl (url1), new NSUrl (url2), new NSUrl (url3)); This has the added advantage that it does not require users -to create an array purely for passing elements. +to create an array purely for passing elements. ## PlainString @@ -2045,7 +2010,7 @@ void SetText (string theText); void LogMessage ([PlainString] string theText); ``` - + ## RetainAttribute @@ -2070,7 +2035,7 @@ public class RetainAttribute { } ``` - + ## RetainListAttribute @@ -2131,7 +2096,7 @@ methods on it will throw an exception). If the object passed was not created, or if there was already an outstanding managed representation of the object, -the forced dispose does not take place. +the forced dispose does not take place. # Property Attributes @@ -2157,11 +2122,11 @@ interface MyString { IntPtr Constructor (string value); [Export ("value")] - string Value { - get; + string Value { + get; - [NotImplemented ("Not available on MyString, use MyMutableString to set")] - set; + [NotImplemented ("Not available on MyString, use MyMutableString to set")] + set; } } @@ -2193,7 +2158,7 @@ enum NSRunLoopMode { [Field ("NSRunLoopCommonModes")] Common, - + [Field (null)] Other = 1000 } @@ -2272,14 +2237,13 @@ Call (NSRunLoopModeExtensions.GetValue (constant)); // will return 1000 If no `null` value is present then an `ArgumentNullException` will be thrown. - # Global Attributes Global attributes are either applied using the `[assembly:]` attribute modifier like the `LinkWithAttribute` or can be used anywhere, like the `Lion` and `Since` attributes. - + ## LinkWithAttribute @@ -2331,14 +2295,14 @@ into the resulting assembly, allowing users to ship a single DLL that contains both the unmanaged dependencies as well as the command line flags necessary to properly consume the library from Xamarin.iOS. -It' s also possible to not provide a `libraryName`, in which case the +It's also possible to not provide a `libraryName`, in which case the `LinkWith` attribute can be used to only specify additional linker flags: ``` csharp [assembly: LinkWith (LinkerFlags = "-lsqlite3")] ``` - + ### LinkWithAttribute Constructors @@ -2365,7 +2329,7 @@ Examples: [assembly: LinkWith ("libDemo.a", LinkTarget.Thumb | LinkTarget.Simulator, SmartLink = true, ForceLoad = true, IsCxx = true); ``` - + ### LinkWithAttribute.ForceLoad @@ -2374,7 +2338,7 @@ The `ForceLoad` property is used to decide whether or not the `-force_load` link flag is used for linking the native library. For now, this should always be true. - + ### LinkWithAttribute.Frameworks @@ -2385,7 +2349,7 @@ containing a space-delimited list of the required platform frameworks. For example, if you are binding a library that requires `CoreGraphics` and `CoreText`, you would set the `Frameworks` property to `"CoreGraphics CoreText"`. - + ### LinkWithAttribute.IsCxx @@ -2394,7 +2358,7 @@ Set this property to true if the resulting executable needs to be compiled using a C++ compiler instead of the default, which is a C compiler. Use this if the library that you are binding was written in C++. - + ### LinkWithAttribute.LibraryName @@ -2407,7 +2371,7 @@ Earlier versions of Xamarin.iOS checked the `LinkTarget` property to determine the platform your library supported, but this is now auto-detected, and the `LinkTarget` property is ignored. - + ### LinkWithAttribute.LinkerFlags @@ -2419,7 +2383,7 @@ application. For example, if the native library requires libxml2 and zlib, you would set the `LinkerFlags` string to `"-lxml2 -lz"`. - + ### LinkWithAttribute.LinkTarget @@ -2428,7 +2392,6 @@ Earlier versions of Xamarin.iOS checked the `LinkTarget` property to determine the platform your library supported, but this is now auto-detected, and the `LinkTarget` property is ignored. - ### LinkWithAttribute.NeedsGccExceptionHandling @@ -2436,7 +2399,7 @@ the platform your library supported, but this is now auto-detected, and the Set this property to true if the library that you are linking requires the GCC Exception Handling library (gcc_eh) - + ### LinkWithAttribute.SmartLink @@ -2444,7 +2407,7 @@ GCC Exception Handling library (gcc_eh) The `SmartLink` property should be set to true to let Xamarin.iOS determine whether `ForceLoad` is required or not. - + ### LinkWithAttribute.WeakFrameworks @@ -2463,7 +2426,7 @@ Good candidates for weak linking would be `Frameworks` like Accounts, `CoreBluetooth`, `CoreImage`, `GLKit`, `NewsstandKit` and `Twitter` since they are only available in iOS 5. - + ## SinceAttribute (iOS) and LionAttribute (MacOS X) @@ -2506,8 +2469,8 @@ public interface UITableViewController { [Export ("tableView", ArgumentSemantic.Retain)] UITableView TableView { get; set; } - [Since (3,2)] - [Export ("clearsSelectionOnViewWillAppear")] + [Since (3,2)] + [Export ("clearsSelectionOnViewWillAppear")] bool ClearsSelectionOnViewWillAppear { get; set; } ``` @@ -2517,7 +2480,7 @@ used in iOS is that iOS is revised very often, while major OS X releases happen rarely and it is easier to remember the operating system by their codename than by their version number - + ## AdviceAttribute @@ -2532,7 +2495,7 @@ better API. The information from this attribute is shown in the documentation and tools can be developed to give user suggestions on how to improve -his code. +his code. ## ZeroCopyStringsAttribute @@ -2583,10 +2546,10 @@ With Xamarin.iOS 8.0 we introduced support for easily creating Strongly Typed classes that wrap `NSDictionaries`. While it has always been possible to use the -[DictionaryContainer](http://iosapi.xamarin.com/?link=T%3aMonoTouch.Foundation.DictionaryContainer) +[DictionaryContainer](/api/type/Foundation.DictionaryContainer/) data type together with a manual API, it is now a lot simpler to do -this. For a walkthrough, see [Surfacing Strong -Types](/guides/ios/advanced_topics/binding_objc_libs#Surfacing_Strong_Types). +this. For more information, see [Surfacing Strong +Types](/guides/cross-platform/macios/binding/objective-c-libraries/#Surfacing_Strong_Types_for_weak_NSDictionary_parameters). @@ -2594,7 +2557,7 @@ Types](/guides/ios/advanced_topics/binding_objc_libs#Surfacing_Strong_Types). When this attribute is applied to an interface, the generator will produce a class with the same name as the interface that derives from -[DictionaryContainer](http://iosapi.xamarin.com/?link=T%3aFoundation.DictionaryContainer) +[DictionaryContainer](/api/type/Foundation.DictionaryContainer/) and turns each property defined in the interface into a strongly typed getter and setter for the dictionary. @@ -2731,6 +2694,3 @@ definition: NSArray containing NSNumbers with the value - - - diff --git a/docs/website/generator-errors.md b/docs/website/generator-errors.md index 7154a4400b..0611c075f2 100644 --- a/docs/website/generator-errors.md +++ b/docs/website/generator-errors.md @@ -1,5 +1,8 @@ -id:{505F978C-9553-49A8-9632-0D6D8A0A0287} -title:Xamarin.iOS/Xamarin.Mac binding errors +--- +id: 505F978C-9553-49A8-9632-0D6D8A0A0287 +title: "Xamarin.iOS/Xamarin.Mac binding errors" +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) @@ -10,7 +13,7 @@ title:Xamarin.iOS/Xamarin.Mac binding errors E.g. parameters, environment -

BI0000: Unexpected error - Please fill a bug report at https://bugzilla.xamarin.com

+### BI0000: Unexpected error - Please fill a bug report at https://bugzilla.xamarin.com An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with as much information as possible, including: @@ -20,19 +23,19 @@ An unexpected error condition occurred. Please [file a bug report](https://bugzi The easiest way to get exact version information is to use the **Xamarin Studio** menu, **About Xamarin Studio** item, **Show Details** button and copy/paste the version informations (you can use the **Copy Information** button). -

BI0001: The .NET runtime could not load the {mi.ReturnType.Name} type. Message: {ex.Message}

+### BI0001: The .NET runtime could not load the {mi.ReturnType.Name} type. Message: {ex.Message} -

BI0026: Could not parse the command line argument '{argument}': {message}

+### BI0026: Could not parse the command line argument '{argument}': {message} -

BI0068: Invalid value for target framework: *.

+### BI0068: Invalid value for target framework: *. An invalid target framework was passed using the --target-framework argument. Please specify a valid target framework. -

BI0070: Invalid target framework: *. Valid target frameworks are: *.

+### BI0070: Invalid target framework: *. Valid target frameworks are: *. An invalid target framework was passed using the --target-framework argument. Please specify a valid target framework. -

BI0086: A target framework (--target-framework) must be specified when building for *.

+### BI0086: A target framework (--target-framework) must be specified when building for *. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. @@ -41,169 +44,169 @@ This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug repo -

BI1001: Do not know how to make a trampoline for *

+### BI1001: Do not know how to make a trampoline for * -

BI1002: Unknown kind * in method '*'

+### BI1002: Unknown kind * in method '*' -

BI1003: The delegate method *.* needs to take at least one parameter

+### BI1003: The delegate method *.* needs to take at least one parameter -

BI1004: The delegate method *.* is missing the [EventArgs] attribute (has * parameters)

+### BI1004: The delegate method *.* is missing the [EventArgs] attribute (has * parameters) -

BI1005: EventArgs in *.* attribute should not include the text `EventArgs' at the end

+### BI1005: EventArgs in *.* attribute should not include the text `EventArgs' at the end -

BI1006: The delegate method *.* is missing the [DelegateName] attribute (or EventArgs)

+### BI1006: The delegate method *.* is missing the [DelegateName] attribute (or EventArgs) -

BI1007: Unknown attribute * on *

+### BI1007: Unknown attribute * on * -

BI1008: [IsThreadStatic] is only valid on properties that are also [Static]

+### BI1008: [IsThreadStatic] is only valid on properties that are also [Static] -

BI1009: No selector specified for method `*.*'

+### BI1009: No selector specified for method `*.*' -

BI1010: No Export attribute on *.* property

+### BI1010: No Export attribute on *.* property -

BI1011: Do not know how to extract type */* from an NSDictionary

+### BI1011: Do not know how to extract type */* from an NSDictionary -

BI1012: No Export or Bind attribute defined on *.*

+### BI1012: No Export or Bind attribute defined on *.* -

BI1013: Unsupported type for Fields (string), you probably meant NSString

+### BI1013: Unsupported type for Fields (string), you probably meant NSString -

BI1014: Unsupported type for Fields: *

+### BI1014: Unsupported type for Fields: * -

BI1015: In class * You specified the Events property, but did not bind those to names with Delegates

+### BI1015: In class * You specified the Events property, but did not bind those to names with Delegates -

BI1016: The delegate method *.* is missing the [DefaultValue] attribute

+### BI1016: The delegate method *.* is missing the [DefaultValue] attribute -

BI1017: Do not know how to make a signature for *

+### BI1017: Do not know how to make a signature for * -

BI1018: No [Export] attribute on property *.*

+### BI1018: No [Export] attribute on property *.* -

BI1019: Invalid [NoDefaultValue] attribute on method `*.*'

+### BI1019: Invalid [NoDefaultValue] attribute on method `*.*' -

BI1020: Unsupported type * used on exported method *.*

+### BI1020: Unsupported type * used on exported method *.* -

BI1021: Unsupported type for read/write Fields: *

+### BI1021: Unsupported type for read/write Fields: * -

BI1022: Model classes can not be categories

+### BI1022: Model classes can not be categories -

BI1023: The number of Events (Type) and Delegates (string) must match for `*`

+### BI1023: The number of Events (Type) and Delegates (string) must match for `*` -

BI1024: No selector specified for property '*.*'

+### BI1024: No selector specified for property '*.*' -

BI1025: [Static] and [Protocol] are mutually exclusive (*)

+### BI1025: [Static] and [Protocol] are mutually exclusive (*) -

BI1026: `*`: Enums attributed with [*] must have an underlying type of `long` or `ulong`

+### BI1026: `*`: Enums attributed with [*] must have an underlying type of `long` or `ulong` -

BI1027: Support for ZeroCopy strings is not implemented. Strings will be marshalled as NSStrings.

+### BI1027: Support for ZeroCopy strings is not implemented. Strings will be marshalled as NSStrings. -

BI1028: Internal sanity check failed, please file a bug report (http://bugzilla.xamarin.com) with a test case.

+### BI1028: Internal sanity check failed, please file a bug report (http://bugzilla.xamarin.com) with a test case. -

BI1029: Internal error: invalid enum mode for type '*'

+### BI1029: Internal error: invalid enum mode for type '*' -

BI1030: * cannot have [BaseType(typeof(*))] as it creates a circular dependency

+### BI1030: * cannot have [BaseType(typeof(*))] as it creates a circular dependency -

BI1031: The [Target] attribute is not supported for the Unified API (found on the member '*.*'). For Objective-C categories, create an api definition interface with the [Category] attribute instead.

+### BI1031: The [Target] attribute is not supported for the Unified API (found on the member '*.*'). For Objective-C categories, create an api definition interface with the [Category] attribute instead. -

BI1034: The [Protocolize] attribute is set on the property *.*, but the property's type (*) is not a protocol.

+### BI1034: The [Protocolize] attribute is set on the property *.*, but the property's type (*) is not a protocol. -

BI1035: The property * on class * is hiding a property from a parent class * but the selectors do not match.

+### BI1035: The property * on class * is hiding a property from a parent class * but the selectors do not match. -

BI1036: The last parameter in the method '*.*' must be a delegate (it's '*').

+### BI1036: The last parameter in the method '*.*' must be a delegate (it's '*'). -

BI1037: The selector * on type * is found multiple times with both read only and write only versions, with no read/write version.

+### BI1037: The selector * on type * is found multiple times with both read only and write only versions, with no read/write version. -

BI1038: The selector * on type * is found multiple times with different return types.

+### BI1038: The selector * on type * is found multiple times with different return types. -

BI1039: The selector * on type * is found multiple times with different argument length * : *.

+### BI1039: The selector * on type * is found multiple times with different argument length * : *. -

BI1040: The selector * on type * is found multiple times with different argument out states on argument *.

+### BI1040: The selector * on type * is found multiple times with different argument out states on argument *. -

BI1041: The selector * on type * is found multiple times with different argument types on argument * - * : *.

+### BI1041: The selector * on type * is found multiple times with different argument types on argument * - * : *. -

BI1042: Missing '[Field (LibraryName=value)]' for {field_pi.Name} (e.g."__Internal")

+### BI1042: Missing '[Field (LibraryName=value)]' for {field_pi.Name} (e.g."__Internal") -

BI1043: Repeated overload {mi.Name} and no [DelegateApiNameAttribute] provided to generate property name on host class.

+### BI1043: Repeated overload {mi.Name} and no [DelegateApiNameAttribute] provided to generate property name on host class. -

BI1044: Repeated name '{apiName.Name}' provided in [DelegateApiNameAttribute].

+### BI1044: Repeated name '{apiName.Name}' provided in [DelegateApiNameAttribute]. -

BI1045: Only a single [DefaultEnumValue] attribute can be used inside enum {type.Name}.

+### BI1045: Only a single [DefaultEnumValue] attribute can be used inside enum {type.Name}. -

BI1046: The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}.

+### BI1046: The [Field] constant {fa.SymbolName} cannot only be used once inside enum {type.Name}. -

BI1047: Unsupported platform: *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.

+### BI1047: Unsupported platform: *. Please file a bug report (http://bugzilla.xamarin.com) with a test case. -

BI1048: Unsupported type * decorated with [BindAs].

+### BI1048: Unsupported type * decorated with [BindAs]. -

BI1049: Could not unbox type * from * container used on * member decorated with [BindAs].

+### BI1049: Could not unbox type * from * container used on * member decorated with [BindAs]. -

BI1050: [BindAs] cannot be used inside Protocol or Model types. Type: *

+### BI1050: [BindAs] cannot be used inside Protocol or Model types. Type: * -

BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.

+### BI1051: Internal error: Don't know how to get attributes for *. Please file a bug report (http://bugzilla.xamarin.com) with a test case. -

BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (http://bugzilla.xamarin.com) with a test case.

+### BI1052: Internal error: Could not find the type * in the assembly *. Please file a bug report (http://bugzilla.xamarin.com) with a test case. -

BI1053: Internal error: unknown target framework '*'.

+### BI1053: Internal error: unknown target framework '*'. -

BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case.

+### BI1054: Internal error: can't convert type '*' (unknown assembly). Please file a bug report (https://bugzilla.xamarin.com) with a test case. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case. -

BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.

+### BI1055: Internal error: failed to convert type '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case. -

BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://bugzilla.xamarin.com) with a test case.

+### BI1056: Internal error: failed to instantiate mock attribute '*' (could not convert type constructor argument #*). Please file a bug report (https://bugzilla.xamarin.com) with a test case. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case. -

BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://bugzilla.xamarin.com) with a test case.

+### BI1057: Internal error: failed to instantiate mock attribute '*' (could not convert constructor type #* (*)). Please file a bug report (https://bugzilla.xamarin.com) with a test case. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case. -

BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case.

+### BI1058: Internal error: could not find a constructor for the mock attribute '*'. Please file a bug report (https://bugzilla.xamarin.com) with a test case. This usually indicates a bug in Xamarin.iOS/Xamarin.Mac; please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS&component=Tools) with a test case. -

BI1059: Found * * attributes on the member *. At most one was expected.

+### BI1059: Found * * attributes on the member *. At most one was expected. -

BI1060: The * protocol is decorated with [Model], but not [BaseType]. Please verify that [Model] is relevant for this protocol; if so, add [BaseType] as well, otherwise remove [Model].

+### BI1060: The * protocol is decorated with [Model], but not [BaseType]. Please verify that [Model] is relevant for this protocol; if so, add [BaseType] as well, otherwise remove [Model]. -

BI1061: The attribute '{attribute}' found on '{member}' is not a valid binding attribute. Please remove this attribute.

+### BI1061: The attribute '{attribute}' found on '{member}' is not a valid binding attribute. Please remove this attribute. # BI11xx: warnings -

BI1101: Trying to use a string as a [Target]

+### BI1101: Trying to use a string as a [Target] -

BI1102: Using the deprecated EventArgs for a delegate signature in *.*, please use DelegateName instead

+### BI1102: Using the deprecated EventArgs for a delegate signature in *.*, please use DelegateName instead -

BI1103: '*' does not live under a namespace; namespaces are a highly recommended .NET best practice

+### BI1103: '*' does not live under a namespace; namespaces are a highly recommended .NET best practice -

BI1104: Could not load the referenced library '*': *.

+### BI1104: Could not load the referenced library '*': *. -

BI1105: Potential selector/argument mismatch [Export ("*")] has * arguments and *.* has * arguments

+### BI1105: Potential selector/argument mismatch [Export ("*")] has * arguments and *.* has * arguments -

BI1106: The parameter * in the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*)

+### BI1106: The parameter * in the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*) -

BI1107: The return type of the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*).

+### BI1107: The return type of the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*). -

BI1108: The [Protocolize] attribute is applied to the return type of the method *.*, but the return type (*) isn't a model and can thus not be protocolized. Please remove the [Protocolize] attribute.

+### BI1108: The [Protocolize] attribute is applied to the return type of the method *.*, but the return type (*) isn't a model and can thus not be protocolized. Please remove the [Protocolize] attribute. -

BI1109: The return type of the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*).

+### BI1109: The return type of the method *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*). -

BI1110: The property *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*).

+### BI1110: The property *.* exposes a model (*). Please expose the corresponding protocol type instead (*.I*). -

BI1111: Interface '*' on '*' is being ignored as it is not a protocol. Did you mean '*' instead?

+### BI1111: Interface '*' on '*' is being ignored as it is not a protocol. Did you mean '*' instead? -

BI1112: Property * should be renamed to 'Delegate' for BaseType.Events and BaseType.Delegates to work.

+### BI1112: Property * should be renamed to 'Delegate' for BaseType.Events and BaseType.Delegates to work. -

BI1113: BaseType.Delegates were set but no properties could be found. Do ensure that the WrapAttribute is used on the right properties.

+### BI1113: BaseType.Delegates were set but no properties could be found. Do ensure that the WrapAttribute is used on the right properties. -

BI1114: Binding error: test unable to find property: * on *.

+### BI1114: Binding error: test unable to find property: * on *. -

BI1115: The parameter '*' in the delegate '*' does not have a [CCallback] or [BlockCallback] attribute. Defaulting to [CCallback].

+### BI1115: The parameter '*' in the delegate '*' does not have a [CCallback] or [BlockCallback] attribute. Defaulting to [CCallback]. -

BI1116: The parameter '*' in the delegate '*' does not have a [CCallback] or [BlockCallback] attribute. Defaulting to [CCallback]. Declare a custom delegate instead of using System.Action / System.Func and add the attribute on the corresponding parameter.

+### BI1116: The parameter '*' in the delegate '*' does not have a [CCallback] or [BlockCallback] attribute. Defaulting to [CCallback]. Declare a custom delegate instead of using System.Action / System.Func and add the attribute on the corresponding parameter. diff --git a/docs/website/mmp-errors.md b/docs/website/mmp-errors.md index 211602d470..7a0ae3111e 100644 --- a/docs/website/mmp-errors.md +++ b/docs/website/mmp-errors.md @@ -1,5 +1,8 @@ -id:{5B26339F-A202-4E41-9229-D0BC9E77868E} -title:Xamarin.Mac errors +--- +id: 5B26339F-A202-4E41-9229-D0BC9E77868E +title: Xamarin.Mac errors +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) @@ -9,7 +12,7 @@ title:Xamarin.Mac errors E.g. parameters, environment, missing tools. -

MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com

+### MM0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=Xamarin.Mac) with as much information as possible, including: @@ -19,142 +22,142 @@ An unexpected error condition occurred. Please [file a bug report](https://bugzi The easiest way to get exact version information is to use the **Xamarin Studio** menu, **About Xamarin Studio** item, **Show Details** button and copy/paste the version informations (you can use the **Copy Information** button). -

MM0001: This version of Xamarin.Mac requires Mono {0} (the current Mono version is {1}). Please update the Mono.framework from http://mono-project.com/Downloads

+### MM0001: This version of Xamarin.Mac requires Mono {0} (the current Mono version is {1}). Please update the Mono.framework from http://mono-project.com/Downloads -

MM0003: Application name '{0}.exe' conflicts with an SDK or product assembly (.dll) name.

+### MM0003: Application name '{0}.exe' conflicts with an SDK or product assembly (.dll) name. -

MM0007: The root assembly '{0}' does not exist

+### MM0007: The root assembly '{0}' does not exist -

MM0008: You should provide one root assembly only, found {0} assemblies: '{1}'

+### MM0008: You should provide one root assembly only, found {0} assemblies: '{1}' -

MM0010: Could not parse the command line arguments: {0}

+### MM0010: Could not parse the command line arguments: {0} -

MM0016: The option '{0}' has been deprecated.

+### MM0016: The option '{0}' has been deprecated. -

MM0017: You should provide a root assembly

+### MM0017: You should provide a root assembly -

MM0018: Unknown command line argument: '{0}'

+### MM0018: Unknown command line argument: '{0}' -

MM0020: The valid options for '{0}' are '{1}'.

+### MM0020: The valid options for '{0}' are '{1}'. -

MM0023: Application name '{0}.exe' conflicts with another user assembly.

+### MM0023: Application name '{0}.exe' conflicts with another user assembly. -

MM0026: Could not parse the command line argument '{0}': {1}

+### MM0026: Could not parse the command line argument '{0}': {1} -

MM0043: The Boehm garbage collector is not supported. The SGen garbage collector has been selected instead.

+### MM0043: The Boehm garbage collector is not supported. The SGen garbage collector has been selected instead. -

MM0050: You cannot provide a root assembly if --no-root-assembly is passed.

+### MM0050: You cannot provide a root assembly if --no-root-assembly is passed. -

MM0051: An output directory (--output) is required if --no-root-assembly is passed.

+### MM0051: An output directory (--output) is required if --no-root-assembly is passed. -

MM0053: Cannot disable new refcount with the Unified API.

+### MM0053: Cannot disable new refcount with the Unified API. -

MM0056: Cannot find Xcode in any of our default locations. Please install Xcode, or pass a custom path using --sdkroot=

+### MM0056: Cannot find Xcode in any of our default locations. Please install Xcode, or pass a custom path using --sdkroot= -

MM0059: Could not find the currently selected Xcode on the system: {0};

+### MM0059: Could not find the currently selected Xcode on the system: {0}; -

MM0060: Could not find the currently selected Xcode on the system. 'xcode-select --print-path' returned '{0}', but that directory does not exist.

+### MM0060: Could not find the currently selected Xcode on the system. 'xcode-select --print-path' returned '{0}', but that directory does not exist. -

MM0068: Invalid value for target framework: {0}.

+### MM0068: Invalid value for target framework: {0}. -

MM0079: Internal Error - No executable was copied into the app bundle. Please contact 'support@xamarin.com'

+### MM0079: Internal Error - No executable was copied into the app bundle. Please contact 'support@xamarin.com' -

MM0080: Disabling NewRefCount, --new-refcount:false, is deprecated.

+### MM0080: Disabling NewRefCount, --new-refcount:false, is deprecated. -

MM0097: machine.config file '{0}' can not be found.

+### MM0097: machine.config file '{0}' can not be found. -

MM0098: AOT compilation is only available on Unified

+### MM0098: AOT compilation is only available on Unified -

MM0099: Internal error {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com).

+### MM0099: Internal error {0}. Please file a bug report with a test case (http://bugzilla.xamarin.com). -

MM0114: Hybrid AOT compilation requires all assemblies to be AOT compiled.

+### MM0114: Hybrid AOT compilation requires all assemblies to be AOT compiled. # MM1xxx: file copy / symlinks (project related) -

MM1034: Could not create symlink '{file}' -> '{target}': error {number}

+### MM1034: Could not create symlink '{file}' -> '{target}': error {number} ## MM14xx: Product assemblies -

MM1401: The required '{0}' assembly is missing from the references

+### MM1401: The required '{0}' assembly is missing from the references -

MM1402: The assembly '{0}' is not compatible with this tool

+### MM1402: The assembly '{0}' is not compatible with this tool -

MM1403: {0} '{1}' could not be found. Target framework '{0}' is unusable to package the application.

+### MM1403: {0} '{1}' could not be found. Target framework '{0}' is unusable to package the application. -

MM1404: Target framework '{0}' is invalid.

+### MM1404: Target framework '{0}' is invalid. -

MM1405: useFullXamMacFramework must always target framework .NET 4.5, not '{0}' which is invalid

+### MM1405: useFullXamMacFramework must always target framework .NET 4.5, not '{0}' which is invalid -

MM1406: Target framework '{0}' is invalid when targetting Xamarin.Mac 4.5 .NET framwork.

+### MM1406: Target framework '{0}' is invalid when targetting Xamarin.Mac 4.5 .NET framwork. -

MM1407: Mismatch between Xamarin.Mac reference '{0}' and target framework selected '{1}'.

+### MM1407: Mismatch between Xamarin.Mac reference '{0}' and target framework selected '{1}'. ## MM15xx: Assembly gathering (not requiring linker) errors -

MM1501: Can not resolve reference: {0}

+### MM1501: Can not resolve reference: {0} ## MachO.cs -

MM1600: Not a Mach-O dynamic library (unknown header '0x{0}'): {1}.

+### MM1600: Not a Mach-O dynamic library (unknown header '0x{0}'): {1}. -

MM1601: Not a static library (unknown header '{0}'): {1}.

+### MM1601: Not a static library (unknown header '{0}'): {1}. -

MM1602: Not a Mach-O dynamic library (unknown header '0x{0}'): {1}.

+### MM1602: Not a Mach-O dynamic library (unknown header '0x{0}'): {1}. -

MM1603: Unknown format for fat entry at position {0} in {1}.

+### MM1603: Unknown format for fat entry at position {0} in {1}. -

MM1604: File of type {0} is not a MachO file ({1}).

+### MM1604: File of type {0} is not a MachO file ({1}). # MM2xxx: Linker ## MM20xx: Linker (general) errors -

MM2001: Could not link assemblies

+### MM2001: Could not link assemblies -

MM2002: Can not resolve reference: {0}

+### MM2002: Can not resolve reference: {0} -

MM2003: Option '{0}' will be ignored since linking is disabled

+### MM2003: Option '{0}' will be ignored since linking is disabled -

MM2004: Extra linker definitions file '{0}' could not be located.

+### MM2004: Extra linker definitions file '{0}' could not be located. -

MM2005: Definitions from '{0}' could not be parsed.

+### MM2005: Definitions from '{0}' could not be parsed. -

MM2006: Native library '{0}' was referenced but could not be found.

+### MM2006: Native library '{0}' was referenced but could not be found. -

MM2007: Xamarin.Mac Unified API against a full .NET profile does not support linking. Pass the -nolink flag.

+### MM2007: Xamarin.Mac Unified API against a full .NET profile does not support linking. Pass the -nolink flag. -

MM2009: Referenced by {0}.{1} ** This message is related to MM2006 **

+### MM2009: Referenced by {0}.{1} ** This message is related to MM2006 ** -

MM2010: Unknown HttpMessageHandler `{0}`. Valid values are HttpClientHandler (default), CFNetworkHandler or NSUrlSessionHandler

+### MM2010: Unknown HttpMessageHandler `{0}`. Valid values are HttpClientHandler (default), CFNetworkHandler or NSUrlSessionHandler -

MM2011: Unknown TLSProvider `{0}. Valid values are default or appletls

+### MM2011: Unknown TLSProvider `{0}. Valid values are default or appletls -

MM2012: Only first {0} of {1} "Referenced by" warnings shown. ** This message related to 2009 **

+### MM2012: Only first {0} of {1} "Referenced by" warnings shown. ** This message related to 2009 ** -

MM2013: Failed to resolve the reference to "{0}", referenced in "{1}". The app will not include the referenced assembly, and may fail at runtime.

+### MM2013: Failed to resolve the reference to "{0}", referenced in "{1}". The app will not include the referenced assembly, and may fail at runtime. -

MM2014: Xamarin.Mac Extensions do not support linking. Request for linking will be ignored. ** This message is obsolete in XM 3.6+ **

+### MM2014: Xamarin.Mac Extensions do not support linking. Request for linking will be ignored. ** This message is obsolete in XM 3.6+ ** -

MM2016: Invalid TlsProvider `{0}` option. The only valid value `{1}` will be used.

+### MM2016: Invalid TlsProvider `{0}` option. The only valid value `{1}` will be used. -

MM2017: Could not process XML description: {0}

+### MM2017: Could not process XML description: {0} -

MM202x: Binding Optimizer failed processing `...`.

+### MM202x: Binding Optimizer failed processing `...`. -

MM2100: Xamarin.Mac Classic API does not support Platform Linking.

+### MM2100: Xamarin.Mac Classic API does not support Platform Linking. # MM3xxx: AOT ## MM30xx: AOT (general) errors -

MM3001: Could not AOT the assembly '{0}'

+### MM3001: Could not AOT the assembly '{0}' @@ -163,43 +166,43 @@ The easiest way to get exact version information is to use the **Xamarin Studio* -

MM3009: AOT of '{0}' was requested but was not found

+### MM3009: AOT of '{0}' was requested but was not found -

MM3010: Exclusion of AOT of '{0}' was requested but was not found

+### MM3010: Exclusion of AOT of '{0}' was requested but was not found # MM4xxx: code generation ## MM40xx: driver.m -

MM4001: The main template could not be expanded to `{0}`.

+### MM4001: The main template could not be expanded to `{0}`. ## MM41xx: registrar -

MM4134: Your application is using the '{0}' framework, which isn't included in the MacOS SDK you're using to build your app (this framework was introduced in OSX {2}, while you're building with the MacOS {1} SDK.) This configuration is not supported with the static registrar (pass --registrar:dynamic as an additional mmp argument in your project's Mac Build option to select). Alternatively select a newer SDK in your app's Mac Build options.

+### MM4134: Your application is using the '{0}' framework, which isn't included in the MacOS SDK you're using to build your app (this framework was introduced in OSX {2}, while you're building with the MacOS {1} SDK.) This configuration is not supported with the static registrar (pass --registrar:dynamic as an additional mmp argument in your project's Mac Build option to select). Alternatively select a newer SDK in your app's Mac Build options. # MM5xxx: GCC and toolchain ## MM51xx: compilation -

MM5101: Missing '{0}' compiler. Please install Xcode 'Command-Line Tools' component.

+### MM5101: Missing '{0}' compiler. Please install Xcode 'Command-Line Tools' component. -

MM5103: Failed to compile. Error code - {0}. Please file a bug report at http://bugzilla.xamarin.com

+### MM5103: Failed to compile. Error code - {0}. Please file a bug report at http://bugzilla.xamarin.com ## MM52xx: linking -

MM5202: Mono.framework MDK is missing. Please install the MDK for your Mono.framework version from http://mono-project.com/Downloads

+### MM5202: Mono.framework MDK is missing. Please install the MDK for your Mono.framework version from http://mono-project.com/Downloads -

MM5203: Can't find libxammac.a, likely because of a corrupted Xamarin.Mac installation. Please reinstall Xamarin.Mac.

+### MM5203: Can't find libxammac.a, likely because of a corrupted Xamarin.Mac installation. Please reinstall Xamarin.Mac. -

MM5204: Invalid architecture. x86_64 is only supported on non-Classic profiles.

+### MM5204: Invalid architecture. x86_64 is only supported on non-Classic profiles. -

MM5205: Invalid architecture '{0}'. Valid architectures are i386 and x86_64 (when --profile=mobile).

+### MM5205: Invalid architecture '{0}'. Valid architectures are i386 and x86_64 (when --profile=mobile). -

MM5218: Can't ignore the dynamic symbol {symbol} (--ignore-dynamic-symbol={symbol}) because it was not detected as a dynamic symbol.

+### MM5218: Can't ignore the dynamic symbol {symbol} (--ignore-dynamic-symbol={symbol}) because it was not detected as a dynamic symbol. See the [equivalent mtouch warning](mtouch-errors.md#MT5218). @@ -218,21 +221,21 @@ See the [equivalent mtouch warning](mtouch-errors.md#MT5218). ## MM53xx: other tools -

MM5301: pkg-config could not be found. Please install the Mono.framework from http://mono-project.com/Downloads

+### MM5301: pkg-config could not be found. Please install the Mono.framework from http://mono-project.com/Downloads -

MM5305: Missing 'otool' tool. Please install Xcode 'Command-Line Tools' component

+### MM5305: Missing 'otool' tool. Please install Xcode 'Command-Line Tools' component -

MM5306: Missing dependencies. Please install Xcode 'Command-Line Tools' component

+### MM5306: Missing dependencies. Please install Xcode 'Command-Line Tools' component -

MM5308: Xcode license agreement may not have been accepted. Please launch Xcode.

+### MM5308: Xcode license agreement may not have been accepted. Please launch Xcode. -

MM5309: Native linking failed with error code 1. Check build log for details.

+### MM5309: Native linking failed with error code 1. Check build log for details. -

MM5310: install_name_tool failed with an error code '{0}'. Check build log for details.

+### MM5310: install_name_tool failed with an error code '{0}'. Check build log for details. @@ -259,6 +262,4 @@ See the [equivalent mtouch warning](mtouch-errors.md#MT5218). -

MM8017: The Boehm garbage collector is not supported. Please use SGen instead.

- - +### MM8017: The Boehm garbage collector is not supported. Please use SGen instead. diff --git a/docs/website/mtouch-errors.md b/docs/website/mtouch-errors.md index 9bdc83fb6b..d823fb2075 100644 --- a/docs/website/mtouch-errors.md +++ b/docs/website/mtouch-errors.md @@ -1,5 +1,8 @@ -id:{9F76162B-D622-45DA-996B-2FBF8017E208} -title:Xamarin.iOS errors +--- +id: 9F76162B-D622-45DA-996B-2FBF8017E208 +title: Xamarin.iOS errors +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) @@ -9,12 +12,12 @@ title:Xamarin.iOS errors E.g. parameters, environment, missing tools. - -

MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com

+### MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com An unexpected error condition occurred. Please [file a bug report](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with as much information as possible, including: @@ -24,51 +27,51 @@ An unexpected error condition occurred. Please [file a bug report](https://bugzi The easiest way to get exact version information is to use the **Xamarin Studio** menu, **About Xamarin Studio** item, **Show Details** button and copy/paste the version informations (you can use the **Copy Information** button). -

MT0001: '-devname' was provided without any device-specific action

+### MT0001: '-devname' was provided without any device-specific action This is a warning that is emitted if -devname is passed to mtouch when no device-specific action (-logdev/-installdev/-killdev/-launchdev/-listapps) was requested. -

MT0002: Could not parse the environment variable *.

+### MT0002: Could not parse the environment variable *. This error happens if you try to set an invalid environment key=value variable pair. The correct format is: `mtouch --setenv=VARIABLE=VALUE` -

MT0003: Application name '*.exe' conflicts with an SDK or product assembly (.dll) name.

+### MT0003: Application name '*.exe' conflicts with an SDK or product assembly (.dll) name. The executable assembly's name and the application's name can't match the name of any dll in the app. Please modify the name of your executable. -

MT0004: New refcounting logic requires SGen to be enabled too.

+### MT0004: New refcounting logic requires SGen to be enabled too. If you enable the refcounting extension you must also enable the SGen garbage collector in the project's iOS Build options (Advanced tab). Starting with Xamarin.iOS 7.2.1 this requirement has been lifted, the new refcounting logic can be enabled with both Boehm and SGen Garbage Collectors. -

MT0005: The output directory * does not exist.

+### MT0005: The output directory * does not exist. Please create the directory. This error is not generated anymore, mtouch will automatically create the directory if it doesn't exist. -

MT0006: There is no devel platform at *, use --platform=PLAT to specify the SDK.

+### MT0006: There is no devel platform at *, use --platform=PLAT to specify the SDK. Xamarin.iOS cannot find the SDK directory at the location mentioned in the error message. Please verify that the path is correct. -

MT0007: The root assembly * does not exist.

+### MT0007: The root assembly * does not exist. Xamarin.iOS cannot find the assembly at the location mentioned in the error message. Please verify that the path is correct. -

MT0008: You should provide one root assembly only, found # assemblies: *.

+### MT0008: You should provide one root assembly only, found # assemblies: *. More than one root assembly was passed to mtouch, while there can be only one root assembly. -

MT0009: Error while loading assemblies: *.

+### MT0009: Error while loading assemblies: *. An error occurred while loading the assemblies the root assembly references. More information may be provided in the build output. -

MT0010: Could not parse the command line arguments: *.

+### MT0010: Could not parse the command line arguments: *. An error occurred while parsing the command line arguments. Please verify that they are all correct. -

MT0011: * was built against a more recent runtime (*) than MonoTouch supports.

+### MT0011: * was built against a more recent runtime (*) than MonoTouch supports. This warning is typically reported because the project has a reference to a class library that was not built using the Xamarin.iOS BCL. @@ -76,15 +79,15 @@ The same way an app using the .NET 4.0 SDK may not work on a system only support The general solution is to build the library as a Xamarin.iOS Class Library. This can be accomplished by creating a new Xamarin.iOS Class Library project and add all the source files to it. If you do not have the source code for the library, you should contact the vendor and request that they provide a Xamarin.iOS-compatible version of their library. -

MT0012: Incomplete data is provided to complete *.

+### MT0012: Incomplete data is provided to complete *. This error is not reported anymore in the current version of Xamarin.iOS. -

MT0013: Profiling support requires sgen to be enabled too.

+### MT0013: Profiling support requires sgen to be enabled too. SGen (--sgen) must be enabled if profiling (--profiling) is enabled. -

MT0014: The iOS * SDK does not support building applications targeting *.

+### MT0014: The iOS * SDK does not support building applications targeting *. This can happen in the following circumstances: @@ -94,23 +97,23 @@ This can happen in the following circumstances: Please verify that the installed version of Xcode supports the selected architectures. -

MT0015: Invalid ABI: *. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, arm64 and arm64+llvm.

+### MT0015: Invalid ABI: *. Supported ABIs are: i386, x86_64, armv7, armv7+llvm, armv7+llvm+thumb2, armv7s, armv7s+llvm, armv7s+llvm+thumb2, arm64 and arm64+llvm. An invalid ABI was passed to mtouch. Please specify a valid ABI. -

MT0016: The option * has been deprecated.

+### MT0016: The option * has been deprecated. The mentioned mtouch option has been deprecated and will be ignored. -

MT0017: You should provide a root assembly.

+### MT0017: You should provide a root assembly. It is required to specify a root assembly (typically the main executable) when building an app. -

MT0018: Unknown command line argument: *.

+### MT0018: Unknown command line argument: *. Mtouch does not recognize the command line argument mentioned in the error message. -

MT0019: Only one --[log|install|kill|launch]dev or --[launch|debug]sim option can be used.

+### MT0019: Only one --[log|install|kill|launch]dev or --[launch|debug]sim option can be used. There are several options for mtouch that can't be used simultaneously: @@ -124,239 +127,239 @@ There are several options for mtouch that can't be used simultaneously: -

MT0020 The valid options for '*' are '*'.

+### MT0020 The valid options for '\*' are '\*'. -

MT0021 Cannot compile using gcc/g++ (--use-gcc) when using the static registrar (this is the default when compiling for device). Either remove the --use-gcc flag or use the dynamic registrar (--registrar:dynamic).

+### MT0021 Cannot compile using gcc/g++ (--use-gcc) when using the static registrar (this is the default when compiling for device). Either remove the --use-gcc flag or use the dynamic registrar (--registrar:dynamic). -

MT0022 The options '--unsupported--enable-generics-in-registrar' and '--registrar' are not compatible.

+### MT0022 The options '--unsupported--enable-generics-in-registrar' and '--registrar' are not compatible. Remove both the options `--unsupported--enable-generics-in-registrar` and `--registrar`. Starting with Xamarin.iOS 7.2.1 the default registrar supports generics. This error is no longer shown (the command-line argument `--unsupported--enable-generics-in-registrar` has been removed from mtouch). -

MT0023 Application name '*.exe' conflicts with another user assembly.

+### MT0023 Application name '*.exe' conflicts with another user assembly. The executable assembly's name and the application's name can't match the name of any dll in the app. Please modify the name of your executable. -

MT0024 Could not find required file '*'.

+### MT0024 Could not find required file '*'. -

MT0025 No SDK version was provided. Please add `--sdk=X.Y` to specify which iOS SDK should be used to build your application.

+### MT0025 No SDK version was provided. Please add `--sdk=X.Y` to specify which iOS SDK should be used to build your application. -

MT0026 Could not parse the command line argument '*': *

+### MT0026 Could not parse the command line argument '*': * -

MT0027 The options '*' and '*' are not compatible.

+### MT0027 The options '\*' and '\*' are not compatible. -

MT0028 Cannot enable PIE (-pie) when targeting iOS 4.1 or earlier. Please disable PIE (-pie:false) or set the deployment target to at least iOS 4.2

+### MT0028 Cannot enable PIE (-pie) when targeting iOS 4.1 or earlier. Please disable PIE (-pie:false) or set the deployment target to at least iOS 4.2 -

MT0029: REPL (--enable-repl) is only supported in the simulator (--sim).

+### MT0029: REPL (--enable-repl) is only supported in the simulator (--sim). REPL is only supported if you're building for the simulator. This means that if you pass `--enable-repl` to mtouch, you must also pass `--sim`. -

MT0030: The executable name (*) and the app name (*) are different, this may prevent crash logs from getting symbolicated properly.

+### MT0030: The executable name (\*) and the app name (\*) are different, this may prevent crash logs from getting symbolicated properly. When Xcode symbolicates (translates memory addresses to function names and file/line numbers) the process may fail if the executable and app have different names (without the extension). To fix this either change 'Application Name' in the project's Build/iOS Application options, or change 'Assembly Name' in the project's Build/Output options. -

MT0031: The command line arguments '--enable-background-fetch' and '--launch-for-background-fetch' require '--launchsim' too.

+### MT0031: The command line arguments '--enable-background-fetch' and '--launch-for-background-fetch' require '--launchsim' too. -

MT0032: The option '--debugtrack' is ignored unless '--debug' is also specified.

+### MT0032: The option '--debugtrack' is ignored unless '--debug' is also specified. -

MT0033 A Xamarin.iOS project must reference either monotouch.dll or Xamarin.iOS.dll

+### MT0033 A Xamarin.iOS project must reference either monotouch.dll or Xamarin.iOS.dll -

MT0034 Cannot include both 'monotouch.dll' and 'Xamarin.iOS.dll' in the same Xamarin.iOS project - '*' is referenced explicitly, while '*' is referenced by '*'.

+### MT0034 Cannot include both 'monotouch.dll' and 'Xamarin.iOS.dll' in the same Xamarin.iOS project - '\*' is referenced explicitly, while '\*' is referenced by '*'. -

MT0036 Cannot launch a * simulator for a * app. Please enable the correct architecture(s) in your project's iOS Build options (Advanced page).

+### MT0036 Cannot launch a * simulator for a * app. Please enable the correct architecture(s) in your project's iOS Build options (Advanced page). -

MT0037 monotouch.dll is not 64-bit compatible. Either reference Xamarin.iOS.dll, or do not build for a 64-bit architecture (ARM64 and/or x86_64).

+### MT0037 monotouch.dll is not 64-bit compatible. Either reference Xamarin.iOS.dll, or do not build for a 64-bit architecture (ARM64 and/or x86_64). -

MT0038 The old registrars (--registrar:oldstatic|olddynamic) are not supported when referencing Xamarin.iOS.dll.

+### MT0038 The old registrars (--registrar:oldstatic|olddynamic) are not supported when referencing Xamarin.iOS.dll. -

MT0039 Applications targeting ARMv6 cannot reference Xamarin.iOS.dll.

+### MT0039 Applications targeting ARMv6 cannot reference Xamarin.iOS.dll. -

MT0040 Could not find the assembly '*', referenced by '*'.

+### MT0040 Could not find the assembly '\*', referenced by '\*'. -

MT0041 Cannot reference both 'monotouch.dll' and 'Xamarin.iOS.dll'.

+### MT0041 Cannot reference both 'monotouch.dll' and 'Xamarin.iOS.dll'. -

MT0042 No reference to either monotouch.dll or Xamarin.iOS.dll was found. A reference to monotouch.dll will be added.

+### MT0042 No reference to either monotouch.dll or Xamarin.iOS.dll was found. A reference to monotouch.dll will be added. -

MT0043: The Boehm garbage collector is currently not supported when referencing 'Xamarin.iOS.dll'. The SGen garbage collector has been selected instead.

+### MT0043: The Boehm garbage collector is currently not supported when referencing 'Xamarin.iOS.dll'. The SGen garbage collector has been selected instead. Only the SGen garbage collector is supported with Unified projects. Ensure there are no additional mtouch flags specifying Boehm as the garbage collector. -

MT0044: --listsim is only supported with Xcode 6.0 or later.

+### MT0044: --listsim is only supported with Xcode 6.0 or later. Install a newer Xcode version. -

MT0045: --extension is only supported when using the iOS 8.0 (or later) SDK.

+### MT0045: --extension is only supported when using the iOS 8.0 (or later) SDK. -

MT0047: The minimum deployment target for Unified applications is 5.1.1, the current deployment target is '*'. Please select a newer deployment target in your project's iOS Application options.

+### MT0047: The minimum deployment target for Unified applications is 5.1.1, the current deployment target is '*'. Please select a newer deployment target in your project's iOS Application options. -

MT0049: *.framework is supported only if deployment target is 8.0 or later. * features might not work correctly.

+### MT0049: *.framework is supported only if deployment target is 8.0 or later. * features might not work correctly. The specified framework is not supported in the iOS version the deployment target refers to. Either update the deployment target to a newer iOS version, or remove usage of the specified framework from the app. -

MT0051: Xamarin.iOS * requires Xcode 5.0 or later. The current Xcode version (found in *) is *.

+### MT0051: Xamarin.iOS * requires Xcode 5.0 or later. The current Xcode version (found in *) is *. Install a newer Xcode. -

MT0052: No command specified.

+### MT0052: No command specified. No action was specified for mtouch. -

MT0054: Unable to canonicalize the path '*': *

+### MT0054: Unable to canonicalize the path '*': * This is an internal error. If you see this error, please file a bug [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT0055: The Xcode path '*' does not exist.

+### MT0055: The Xcode path '*' does not exist. The Xcode path passed using `--sdkroot` does not exist. Please specify a valid path. -

MT0056: Cannot find Xcode in the default location (/Applications/Xcode.app). Please install Xcode, or pass a custom path using --sdkroot .

-

MT0057: Cannot determine the path to Xcode.app from the sdk root '*'. Please specify the full path to the Xcode.app bundle.

+### MT0056: Cannot find Xcode in the default location (/Applications/Xcode.app). Please install Xcode, or pass a custom path using --sdkroot . +### MT0057: Cannot determine the path to Xcode.app from the sdk root '*'. Please specify the full path to the Xcode.app bundle. The path passed using `--sdkroot` does not specify a valid Xcode app. Please specify a path to an Xcode app. -

MT0058: The Xcode.app '*' is invalid (the file '*' does not exist).

+### MT0058: The Xcode.app '\*' is invalid (the file '\*' does not exist). The path passed using `--sdkroot` does not specify a valid Xcode app. Please specify a path to an Xcode app. -

MT0059: Could not find the currently selected Xcode on the system: *

+### MT0059: Could not find the currently selected Xcode on the system: * -

MT0060: Could not find the currently selected Xcode on the system. 'xcode-select --print-path' returned '*', but that directory does not exist.

+### MT0060: Could not find the currently selected Xcode on the system. 'xcode-select --print-path' returned '*', but that directory does not exist. -

MT0061: No Xcode.app specified (using --sdkroot), using the system Xcode as reported by 'xcode-select --print-path': *

+### MT0061: No Xcode.app specified (using --sdkroot), using the system Xcode as reported by 'xcode-select --print-path': * This is a informational warning, explaining which Xcode will be used, since none was specified. -

MT0062: No Xcode.app specified (using --sdkroot or 'xcode-select --print-path'), using the default Xcode instead: *

+### MT0062: No Xcode.app specified (using --sdkroot or 'xcode-select --print-path'), using the default Xcode instead: * This is a informational warning, explaining which Xcode will be used, since none was specified. -

MT0063: Cannot find the executable in the extension * (no CFBundleExecutable entry in its Info.plist)

+### MT0063: Cannot find the executable in the extension * (no CFBundleExecutable entry in its Info.plist) Every Info.plist must have an executable (using the CFBundleExecutable entry), however an entry should be generated automatically during the build. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0064: Xamarin.iOS only supports embedded frameworks with Unified projects.

+### MT0064: Xamarin.iOS only supports embedded frameworks with Unified projects. Xamarin.iOS only supports embedded frameworks when using the Unified API; please update your project to use the Unified API. -

MT0065: Xamarin.iOS only supports embedded frameworks when deployment target is at least 8.0 (current deployment target: * embedded frameworks: *)

+### MT0065: Xamarin.iOS only supports embedded frameworks when deployment target is at least 8.0 (current deployment target: * embedded frameworks: *) Xamarin.iOS only supports embedded frameworks when the deployment target is at least 8.0 (because earlier versions of iOS does not support embedded frameworks). Please update the deployment target in the project's Info.plist to 8.0 or higher. -

MT0066: Invalid build registrar assembly: *

+### MT0066: Invalid build registrar assembly: * This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0067: Invalid registrar: *

+### MT0067: Invalid registrar: * This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0068: Invalid value for target framework: *.

+### MT0068: Invalid value for target framework: *. An invalid target framework was passed using the --target-framework argument. Please specify a valid target framework. - + -

MT0070: Invalid target framework: *. Valid target frameworks are: *.

+### MT0070: Invalid target framework: *. Valid target frameworks are: *. An invalid target framework was passed using the --target-framework argument. Please specify a valid target framework. -

MT0071: Unknown platform: *. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case.

+### MT0071: Unknown platform: *. This usually indicates a bug in Xamarin.iOS; please file a bug report at http://bugzilla.xamarin.com with a test case. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0072: Extensions are not supported for the platform '*'.

+### MT0072: Extensions are not supported for the platform '*'. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0073: Xamarin.iOS * does not support a deployment target of * (the minimum is *). Please select a newer deployment target in your project's Info.plist.

+### MT0073: Xamarin.iOS * does not support a deployment target of * (the minimum is *). Please select a newer deployment target in your project's Info.plist. The minimum deployment target is the one specified in the error message; please select a newer deployment target in the project's Info.plist. If updating the deployment target is not possible, then please use an older version of Xamarin.iOS. -

MT0074: Xamarin.iOS * does not support a minimum deployment target of * (the maximum is *). Please select an older deployment target in your project's Info.plist or upgrade to a newer version of Xamarin.iOS.

+### MT0074: Xamarin.iOS * does not support a minimum deployment target of * (the maximum is *). Please select an older deployment target in your project's Info.plist or upgrade to a newer version of Xamarin.iOS. Xamarin.iOS does not support setting the minimum deployment target to a higher version than the version this particular version of Xamarin.iOS was built for. Please select an older minimum deployment target in the project's Info.plist, or upgrade to a newer version of Xamarin.iOS. -

MT0075: Invalid architecture '*' for * projects. Valid architectures are: *

+### MT0075: Invalid architecture '*' for * projects. Valid architectures are: * An invalid architecture was specified. Please verify that architecture is valid. -

MT0075: No architecture specified (using the --abi argument). An architecture is required for * projects.

+### MT0075: No architecture specified (using the --abi argument). An architecture is required for * projects. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0076: WatchOS projects must be extensions.

+### MT0076: WatchOS projects must be extensions. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0077: Incremental builds are enabled with a deployment target < 8.0 (currently *). This is not supported (the resulting application will not launch on iOS 9), so the deployment target will be set to 8.0.

+### MT0077: Incremental builds are enabled with a deployment target < 8.0 (currently *). This is not supported (the resulting application will not launch on iOS 9), so the deployment target will be set to 8.0. This is a warning informing that the deployment target has been set to 8.0 for this build so that incremental builds work properly. Incremental builds are only supported when the deployment target is at least 8.0 (because the resulting application will not launch on iOS 9 otherwise). -

MT0078: The recommended Xcode version for Xamarin.iOS * is Xcode * or later. The current Xcode version (found in *) is *.

+### MT0078: The recommended Xcode version for Xamarin.iOS * is Xcode * or later. The current Xcode version (found in *) is *. This is a warning informing that the current version of Xcode is not the recommended version of Xcode for this version of Xamarin.iOS. Please upgrade Xcode in order to ensure optimal behavior. -

MT0080: Disabling NewRefCount, --new-refcount:false, is deprecated.

+### MT0080: Disabling NewRefCount, --new-refcount:false, is deprecated. This is a warning informing that the request to disable the new refcount (--new-refcount:false) has been ignored. The new refcount feature is now mandatory for all projects, and it's thus not possible to disable anymore. -

MT0081: The command line argument --download-crash-report also requires --download-crash-report-to.

-

MT0082: REPL (--enable-repl) is only supported when linking is not used (--nolink).

-

MT0083: Asm-only bitcode is not supported on watchOS. Use either --bitcode:marker or --bitcode:full.

-

MT0084: Bitcode is not supported in the simulator. Do not pass --bitcode when building for the simulator.

-

MT0085: No reference to '*' was found. It will be added automatically.

-

MT0086: A target framework (--target-framework) must be specified when building for TVOS or WatchOS.

+### MT0081: The command line argument --download-crash-report also requires --download-crash-report-to. +### MT0082: REPL (--enable-repl) is only supported when linking is not used (--nolink). +### MT0083: Asm-only bitcode is not supported on watchOS. Use either --bitcode:marker or --bitcode:full. +### MT0084: Bitcode is not supported in the simulator. Do not pass --bitcode when building for the simulator. +### MT0085: No reference to '*' was found. It will be added automatically. +### MT0086: A target framework (--target-framework) must be specified when building for TVOS or WatchOS. This usually indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

MT0087: Incremental builds (--fastdev) is not supported with the Boehm GC. Incremental builds will be disabled.

+### MT0087: Incremental builds (--fastdev) is not supported with the Boehm GC. Incremental builds will be disabled. -

MT0088: The GC must be in cooperative mode for watchOS apps. Please remove the --coop:false argument to mtouch.

+### MT0088: The GC must be in cooperative mode for watchOS apps. Please remove the --coop:false argument to mtouch. -

MT0089: The option '*' cannot take the value '*' when cooperative mode is enabled for the GC.

+### MT0089: The option '\*' cannot take the value '\*' when cooperative mode is enabled for the GC. -

MT0091: This version of Xamarin.iOS requires the * SDK (shipped with Xcode *). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs).

+### MT0091: This version of Xamarin.iOS requires the * SDK (shipped with Xcode *). Either upgrade Xcode to get the required header files or set the managed linker behaviour to Link Framework SDKs Only (to try to avoid the new APIs). Xamarin.iOS requires the header files, from the SDK version specified in the error message, to build your application. The recommended way to fix this error is to upgrade Xcode to get the required SDK, this will include all the required header files. If you have multiple versions of Xcode installed, or want to use an Xcode in a non-default location, make sure to set the correct Xcode location in your IDE's preferences. @@ -366,34 +369,34 @@ A last-straw solution would be to use an older version of Xamarin.iOS, one that -

MT0093: Could not find 'mlaunch'.

+### MT0093: Could not find 'mlaunch'. -

MT0095: Aot files could not be copied to the destination directory {dest}: {error}

+### MT0095: Aot files could not be copied to the destination directory {dest}: {error} -

MT0096: No reference to Xamarin.iOS.dll was found.

+### MT0096: No reference to Xamarin.iOS.dll was found. -

MT0099: Internal error *. Please file a bug report with a test case (http://bugzilla.xamarin.com).

+### MT0099: Internal error *. Please file a bug report with a test case (http://bugzilla.xamarin.com). This error message is reported when an internal consistency check in Xamarin.iOS fails. This indicates a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

Invalid assembly build target: '*'. Please file a bug report with a test case (http://bugzilla.xamarin.com).

+### MT0100: Invalid assembly build target: '*'. Please file a bug report with a test case (http://bugzilla.xamarin.com). This error message is reported when an internal consistency check in Xamarin.iOS fails. This is always a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test case. -

The assembly '*' is specified multiple times in --assembly-build-target arguments.

+### MT0101: The assembly '*' is specified multiple times in --assembly-build-target arguments. The assembly mentioned in the error message is specified multiple times in --assembly-build-target arguments. Please make sure each assembly is only mentioned once. -

The assemblies '*' and '*' have the same target name ('*'), but different targets ('*' and '*').

+### MT0102: The assemblies '\*' and '\*' have the same target name ('\*'), but different targets ('\*' and '*'). The assemblies mentioned in the error message have conflicting build targets. @@ -403,7 +406,7 @@ For example: This example is trying to create both a dynamic library and a framework with the same make (`MyBinary`). -

The static object '*' contains more than one assembly ('*'), but each static object must correspond with exactly one assembly.

+### MT0103: The static object '\*' contains more than one assembly ('\*'), but each static object must correspond with exactly one assembly. The assemblies mentioned in the error message are all compiled to a single static object. This is not allowed, every assembly must be compiled to a different static object. @@ -413,15 +416,15 @@ For example: This example tries to build a static object (`MyBinary`) comprised of two assemblies (`Assembly1.dll` and `Assembly2.dll`), which is not allowed. -

MT0105: No assembly build target was specified for '*'.

+### MT0105: No assembly build target was specified for '*'. -When specifying the assembly build target using --assembly-build-target, every assembly in the app must have a build target assigned. +When specifying the assembly build target using `--assembly-build-target`, every assembly in the app must have a build target assigned. This error is reported when the assembly mentioned in the error message does not have an assembly build target assigned. -See the documentation about --assembly-build-target for further information. +See the documentation about `--assembly-build-target` for further information. -

MT0106: The assembly build target name '*' is invalid: the character '*' is not allowed.

+### MT0106: The assembly build target name '\*' is invalid: the character '\*' is not allowed. The assembly build target name must be a valid filename. @@ -431,17 +434,17 @@ For example these values will trigger this error: because `my/path.o` is not a valid filename due to the directory separator character. -

MT0107: The assemblies '*' have different custom LLVM optimizations (*), which is not allowed when they are all compiled to a single binary.

+### MT0107: The assemblies '\*' have different custom LLVM optimizations (\*), which is not allowed when they are all compiled to a single binary. -

MT0108: The assembly build target '*' did not match any assemblies.

+### MT0108: The assembly build target '*' did not match any assemblies. -

MT0109: The assembly '{0}' was loaded from a different path than the provided path (provided path: {1}, actual path: {2}).

+### MT0109: The assembly '{0}' was loaded from a different path than the provided path (provided path: {1}, actual path: {2}). This is a warning indicating that an assembly referenced by the application was loaded from a different location than requested. This might mean that the app is referencing multiple assemblies with the same name, but from different locations, which might lead to unexpected results (only the first assembly will be used). -

MT0110: Incremental builds have been disabled because this version of Xamarin.iOS does not support incremental builds in projects that include third-party binding libraries and that compiles to bitcode.

+### MT0110: Incremental builds have been disabled because this version of Xamarin.iOS does not support incremental builds in projects that include third-party binding libraries and that compiles to bitcode. Incremental builds have been disabled because this version of Xamarin.iOS does not support incremental builds in projects that include third-party binding libraries and that compiles to bitcode (tvOS and watchOS projects). @@ -451,7 +454,7 @@ For further information see bug #[51710](https://bugzilla.xamarin.com/show_bug.c This warning is not reported anymore. -

MT0111: Bitcode has been enabled because this version of Xamarin.iOS does not support building watchOS projects using LLVM without enabling bitcode.

+### MT0111: Bitcode has been enabled because this version of Xamarin.iOS does not support building watchOS projects using LLVM without enabling bitcode. Bitcode has been enabled automatically because this version of Xamarin.iOS does not support building watchOS projects using LLVM without enabling bitcode. @@ -459,7 +462,7 @@ No action is required on your part, this message is purely informational. For further information see bug #[51634](https://bugzilla.xamarin.com/show_bug.cgi?id=51634). -

MT0112: Native code sharing has been disabled because *

+### MT0112: Native code sharing has been disabled because * There are multiple reasons code sharing can be disabled: @@ -476,67 +479,67 @@ Native code sharing is currently not supported if the container app includes I18 Native code sharing requires is not supported for projects that use custom xml definitions for the managed linker. -

MT0113: Native code sharing has been disabled for the extension '*' because *.

+### MT0113: Native code sharing has been disabled for the extension '*' because *. -* because the bitcode options differ between the container app (*) and the extension (*). +* because the bitcode options differ between the container app (\*) and the extension (\*). -Native code sharing requires that the bitcode options match between the projects that share code. + Native code sharing requires that the bitcode options match between the projects that share code. -* because the --assembly-build-target options are different between the container app (*) and the extension (*). +* because the --assembly-build-target options are different between the container app (\*) and the extension (\*). -Native code sharing requires that the --assembly-build-target options are identical between the projects that share code. + Native code sharing requires that the --assembly-build-target options are identical between the projects that share code. -This condition can occur if incremental builds are not either enabled or disabled in all the projects. + This condition can occur if incremental builds are not either enabled or disabled in all the projects. -* because the I18N assemblies are different between the container app (*) and the extension (*). +* because the I18N assemblies are different between the container app (\*) and the extension (\*). -Native code sharing is currently not supported for extensions that include I18N assemblies. + Native code sharing is currently not supported for extensions that include I18N assemblies. -* because the arguments to the AOT compiler are different between the container app (*) and the extension (*). +* because the arguments to the AOT compiler are different between the container app (\*) and the extension (\*). -Native code sharing requires that the arguments to the AOT compiler do not differ between projects that share code. + Native code sharing requires that the arguments to the AOT compiler do not differ between projects that share code. -* because the other arguments to the AOT compiler are different between the container app (*) and the extension (*). +* because the other arguments to the AOT compiler are different between the container app (\*) and the extension (\*). -Native code sharing requires that the arguments to the AOT compiler do not differ between projects that share code. + Native code sharing requires that the arguments to the AOT compiler do not differ between projects that share code. -This condition occurs if the 'Perform all 32-bit float operations as 64-bit float' differs between projects. + This condition occurs if the 'Perform all 32-bit float operations as 64-bit float' differs between projects. -+ because LLVM is not enabled or disabled in both the container app (*) and the extension (*). +* because LLVM is not enabled or disabled in both the container app (\*) and the extension (\*). -Native code sharing requires that LLVM is either enabled or disabled for all projects that share code. + Native code sharing requires that LLVM is either enabled or disabled for all projects that share code. -* because the managed linker settings are different between the container app (*) and the extension (*). +* because the managed linker settings are different between the container app (\*) and the extension (\*). -Native code sharing requires that the managed linker settings are identical for all projects that share code. + Native code sharing requires that the managed linker settings are identical for all projects that share code. -* because the skipped assemblies for the managed linker are different between the container app (*) and the extension (*). +* because the skipped assemblies for the managed linker are different between the container app (\*) and the extension (\*). -Native code sharing requires that the managed linker settings are identical for all projects that share code. + Native code sharing requires that the managed linker settings are identical for all projects that share code. * because the extension has custom xml definitions for the managed linker (*). -Native code sharing requires is not supported for projects that use custom xml definitions for the managed linker. + Native code sharing requires is not supported for projects that use custom xml definitions for the managed linker. * because the container app does not build for the ABI * (while the extension is building for this ABI). -Native code sharing requires that the container app builds for all the architectures any app extension builds for. + Native code sharing requires that the container app builds for all the architectures any app extension builds for. -For instance: this condition occurs when an extension builds for ARM64+ARMv7, but the container app only builds for ARM64. + For instance: this condition occurs when an extension builds for ARM64+ARMv7, but the container app only builds for ARM64. -* because the container app is building for the ABI *, which is not compatible with the extension's ABI (*). +* because the container app is building for the ABI \*, which is not compatible with the extension's ABI (\*). -Native code sharing requires that all the projects build for the exact same API. + Native code sharing requires that all the projects build for the exact same API. -For instance: this condition occurs when an extension builds for ARMv7+llvm+thumb2, but the container app only builds for ARMv7+llvm. + For instance: this condition occurs when an extension builds for ARMv7+llvm+thumb2, but the container app only builds for ARMv7+llvm. -* because the container app is referencing the assembly '*' from '*', while the extension references a different version from '*'. +* because the container app is referencing the assembly '\*' from '\*', while the extension references a different version from '*'. -Native code sharing requires that all the projects that share code use the same versions for all assemblies. + Native code sharing requires that all the projects that share code use the same versions for all assemblies. -

MT0115: It is recommended to reference dynamic symbols using code (--dynamic-symbol-mode=code) when bitcode is enabled.

+### MT0115: It is recommended to reference dynamic symbols using code (--dynamic-symbol-mode=code) when bitcode is enabled. Xamarin.iOS projects will often reference native symbols dynamically, which means that the native linker might remove such native symbols during the @@ -559,15 +562,15 @@ The solution is to remove the `--dynamic-symbol-mode=linker` argument from the a -

MT0125: The --assembly-build-target command-line argument is ignored in the simulator.

+### MT0125: The --assembly-build-target command-line argument is ignored in the simulator. No action is required, this message is purely informational. -

MT0126: Incremental builds have been disabled because incremental builds are not supported in the simulator.

+### MT0126: Incremental builds have been disabled because incremental builds are not supported in the simulator. No action is required, this message is purely informational. -

MT0127: Incremental builds have been disabled because this version of Xamarin.iOS does not support incremental builds in projects that include more than one third-party binding libraries.

+### MT0127: Incremental builds have been disabled because this version of Xamarin.iOS does not support incremental builds in projects that include more than one third-party binding libraries. Incremental builds have been disabled automatically because this version of Xamarin.iOS does not always build projects with multiple third-party binding libraries correctly. @@ -584,35 +587,35 @@ For further information see bug #[52727](https://bugzilla.xamarin.com/show_bug.c MT10xx installer.cs / mtouch.cs --> -

MT1001 Could not find an application at the specified directory

+### MT1001 Could not find an application at the specified directory -

MT1002 Could not create symlinks, files were copied

+### MT1002 Could not create symlinks, files were copied -

MT1003 Could not kill the application '*'. You may have to kill the application manually.

+### MT1003 Could not kill the application '*'. You may have to kill the application manually. -

MT1004 Could not get the list of installed applications.

+### MT1004 Could not get the list of installed applications. -

MT1005 Could not kill the application '*' on the device '*': *- You may have to kill the application manually.

+### MT1005 Could not kill the application '\*' on the device '\*': *- You may have to kill the application manually. -

MT1006 Could not install the application '*' on the device '*': *.

+### MT1006 Could not install the application '\*' on the device '\*': *. -

MT1007 Failed to launch the application '*' on the device '*': *. You can still launch the application manually by tapping on it.

+### MT1007 Failed to launch the application '\*' on the device '\*': *. You can still launch the application manually by tapping on it. -

MT1008: Failed to launch the simulator

+### MT1008: Failed to launch the simulator @@ -627,7 +630,7 @@ The following command issued on the Unix command line can $ launchctl list|grep UIKitApplication|awk '{print $3}'|xargs launchctl remove ``` -

MT1009 Could not copy the assembly '*' to '*': *

+### MT1009 Could not copy the assembly '\*' to '\*': * This is a known issue in certain versions of Xamarin.iOS. @@ -639,71 +642,64 @@ However, since this issue has been resolved in the latest version of Xamarin.iOS, please file a new bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with your full version information and build log output. -

MT1010 Could not load the assembly '*': *

+### MT1010 Could not load the assembly '*': * -

MT1011 Could not add missing resource file: '*'

+### MT1011 Could not add missing resource file: '*' -

MT1012 Failed to list the apps on the device '*': *

+### MT1012 Failed to list the apps on the device '*': * -

MT1013 Dependency tracking error: no files to compare. Please file a bug report at http://bugzilla.xamarin.com with a test case.

+### MT1013 Dependency tracking error: no files to compare. Please file a bug report at http://bugzilla.xamarin.com with a test case. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a test caes. -

MT1014 Failed to re-use cached version of '*': *.

+### MT1014 Failed to re-use cached version of '*': *. -

MT1015 Failed to create the executable '*': *

+### MT1015 Failed to create the executable '*': * -

MT1015 Failed to create the executable '*': *

+### MT1015 Failed to create the executable '*': * -

MT1016: Failed to create the NOTICE file because a directory already exists with the same name.

+### MT1016: Failed to create the NOTICE file because a directory already exists with the same name. Remove the directory `NOTICE` from the project. -

MT1017: Failed to create the NOTICE file: *.

+### MT1017: Failed to create the NOTICE file: *. -

MT1018: Your application failed code-signing checks and could not be installed on the device '*'. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile (error: 0xe8008015).

-

MT1019: Your application has entitlements not supported by your current provisioning profile and could not be installed on the device '*'. Please check the iOS Device Log for more detailed information (error: 0xe8008016).

+### MT1018: Your application failed code-signing checks and could not be installed on the device '*'. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile (error: 0xe8008015). +### MT1019: Your application has entitlements not supported by your current provisioning profile and could not be installed on the device '*'. Please check the iOS Device Log for more detailed information (error: 0xe8008016). This can happen if: -
    -
  • Your application has entitlements that the current provisioning profile does not support.
    - Possible solutions: -
      -
    • Specify a different provisioning profile that supports the entitlements your application needs.
    • -
    • Remove the entitlements not supported in current provisioning profile.
    • -
    -
  • -
  • The device you're trying to deploy to is not included in the provisioning profile you're using.
    - Possible solutions: -
      -
    • Create a new app from a template in Xcode, select the same provisioning profile, and deploy to same device. Sometimes Xcode can automatically refresh provisioning profiles with new devices (in other cases Xcode will ask you what to do).
    • -
    • Go to the iOS Dev Center and update the provisioning profile with the new device, then download the updated provisioning profile to your machine.
    • -
    -
  • -
+* Your application has entitlements that the current provisioning profile does not support. + Possible solutions: + - Specify a different provisioning profile that supports the entitlements your application needs. + - Remove the entitlements not supported in current provisioning profile. +* The device you're trying to deploy to is not included in the provisioning profile you're using. + Possible solutions: + - Create a new app from a template in Xcode, select the same provisioning profile, and deploy to same device. Sometimes Xcode can automatically refresh provisioning profiles with new devices (in other cases Xcode will ask you what to do). + -Go to the iOS Dev Center and update the provisioning profile with the new device, then download the updated provisioning profile to your machine. + In most cases more information about the failure will be printed to the iOS Device Log, which can help diagnosing the issue. -

MT1020: Failed to launch the application '*' on the device '*': *

+### MT1020: Failed to launch the application '\*' on the device '\*': * -

MT1021: Could not copy the file '*' to '*': {2}

+### MT1021: Could not copy the file '\*' to '\*': {2} A file could not be copied. The error message from the copy operation has more information about the error. -

MT1022: Could not copy the directory '*' to '*': {2}

+### MT1022: Could not copy the directory '\*' to '\*': {2} A directory could not be copied. The error message from the copy operation has more information about the error. -

MT1023: Could not communicate with the device to find the application '*' : *

+### MT1023: Could not communicate with the device to find the application '*' : * An error occurred when trying to lookup an application on device. @@ -714,13 +710,13 @@ Things to try to solve this: * Reboot the device. * Reboot the Mac. -

MT1024: The application signature could not be verified on device '*'. Please make sure that the provisioning profile is installed and not expired (error: 0xe8008017).

+### MT1024: The application signature could not be verified on device '*'. Please make sure that the provisioning profile is installed and not expired (error: 0xe8008017). The device rejected the application install because the signature could not be verified. Please make sure that the provisioning profile is installed and not expired. -

MT1025: Could not list the crash reports on the device *.

+### MT1025: Could not list the crash reports on the device *. An error occurred when trying to list the crash reports on the device. @@ -732,7 +728,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1026: Could not download the crash report * from the device *.

+### MT1026: Could not download the crash report * from the device *. An error occurred when trying to download the crash reports from the device. @@ -744,35 +740,35 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1027: Can't use Xcode 7+ to launch applications on devices with iOS * (Xcode 7 only supports iOS 6+).

+### MT1027: Can't use Xcode 7+ to launch applications on devices with iOS * (Xcode 7 only supports iOS 6+). It is not possible to use Xcode 7+ to launch applications on devices with iOS version below 6.0. Please use an older version of Xcode, or tap on the app manually to launch it. -

MT1028: Invalid device specification: '*'. Expected 'ios', 'watchos' or 'all'.

+### MT1028: Invalid device specification: '*'. Expected 'ios', 'watchos' or 'all'. The device specification passed using --device is invalid. Valid values are: 'ios', 'watchos' or 'all'. -

MT1029: Could not find an application at the specified directory: *

+### MT1029: Could not find an application at the specified directory: * The application path passed to --launchdev does not exist. Please specify a valid app bundle. -

MT1030: Launching applications on device using a bundle identifier is deprecated. Please pass the full path to the bundle to launch.

+### MT1030: Launching applications on device using a bundle identifier is deprecated. Please pass the full path to the bundle to launch. It's recommended to pass the path to the app to launch on device instead of just the bundle id. -

MT1031: Could not launch the app '*' on the device '*' because the device is locked. Please unlock the device and try again.

+### MT1031: Could not launch the app '\*' on the device '\*' because the device is locked. Please unlock the device and try again. Please unlock the device and try again. -

MT1032: This application executable might be too large (* MB) to execute on device. If bitcode was enabled you might want to disable it for development, it is only required to submit applications to Apple.

+### MT1032: This application executable might be too large (* MB) to execute on device. If bitcode was enabled you might want to disable it for development, it is only required to submit applications to Apple. -

MT1033: Could not uninstall the application '*' from the device '*': *

+### MT1033: Could not uninstall the application '\*' from the device '\*': * -

MT1035: Cannot include different versions of the framework '{name}'

+### MT1035: Cannot include different versions of the framework '{name}' It is not possible to link with different versions of the same framework. @@ -780,7 +776,7 @@ This typically happens when an extension references a different version of a fra Following this error there will be multiple [MT1036](#MT1036) errors listing the paths for each different framework. -

MT1036: Framework '{name}' included from: {path} (Related to previous error)

+### MT1036: Framework '{name}' included from: {path} (Related to previous error) This error is reported only together with [MT1036](#MT1036). Please see [MT1036](#MT1036) for more information. @@ -790,37 +786,37 @@ This error is reported only together with [MT1036](#MT1036). Please see [MT1036] MT11xx DebugService.cs --> -

MT1101 Could not start app

+### MT1101 Could not start app -

MT1102 Could not attach to the app (to kill it): *

+### MT1102 Could not attach to the app (to kill it): * -

MT1103 Could not detach

+### MT1103 Could not detach -

MT1104 Failed to send packet: *

+### MT1104 Failed to send packet: * -

MT1105 Unexpected response type

+### MT1105 Unexpected response type -

MT1106 Could not get list of applications on the device: Request timed out.

+### MT1106 Could not get list of applications on the device: Request timed out. -

MT1107: Application failed to launch: *

+### MT1107: Application failed to launch: * Please check if your device is locked. If you're deploying an enterprise app or using a free provisioning profile, you might have trust the developer (this is explained here). -

MT1108: Could not find developer tools for this XX (YY) device.

+### MT1108: Could not find developer tools for this XX (YY) device. A few operations from mtouch require the DeveloperDiskImage.dmg file to be present. This file is part of Xcode and is usually located relative to the @@ -832,11 +828,11 @@ This error can happen either because you do not have a connected. -

MT1109: Application failed to launch because the device is locked. Please unlock the device and try again.

+### MT1109: Application failed to launch because the device is locked. Please unlock the device and try again. Please check if your device is locked. -

MT1110: Application failed to launch because of iOS security restrictions. Please ensure the developer is trusted.

+### MT1110: Application failed to launch because of iOS security restrictions. Please ensure the developer is trusted. If you're deploying an enterprise app or using a free provisioning profile, you might have trust the developer (this is explained here). @@ -846,26 +842,26 @@ If you're deploying an enterprise app or using a free provisioning profile, you MT12xx simcontroller.cs --> -

MT1201: Could not load the simulator: *

-

MT1202: Invalid simulator configuration: *

-

MT1203: Invalid simulator specification: *

-

MT1204: Invalid simulator specification '*': runtime not specified.

-

MT1205: Invalid simulator specification '*': device type not specified.

-

MT1206: Could not find the simulator runtime '*'.

-

MT1207: Could not find the simulator device type '*'.

-

MT1208: Could not find the simulator runtime '*'.

-

MT1209: Could not find the simulator device type '*'.

-

MT1210: Invalid simulator specification: *, unknown key '*'

-

MT1211: The simulator version '*' does not support the simulator type '*'

-

MT1212: Failed to create a simulator version where type = * and runtime = *.

-

MT1213: Invalid simulator specification for Xcode 4: *

-

MT1214: Invalid simulator specification for Xcode 5: *

-

MT1215: Invalid SDK specified: *

-

MT1216: Could not find the simulator UDID '*'.

-

MT1217: Could not load the app bundle at '*'.

-

MT1218: No bundle identifier found in the app at '*'.

-

MT1219: Could not find the simulator for '*'.

-

MT1220: Could not find the latest simulator runtime for device '*'.

+### MT1201: Could not load the simulator: * +### MT1202: Invalid simulator configuration: * +### MT1203: Invalid simulator specification: * +### MT1204: Invalid simulator specification '*': runtime not specified. +### MT1205: Invalid simulator specification '*': device type not specified. +### MT1206: Could not find the simulator runtime '*'. +### MT1207: Could not find the simulator device type '*'. +### MT1208: Could not find the simulator runtime '*'. +### MT1209: Could not find the simulator device type '*'. +### MT1210: Invalid simulator specification: \*, unknown key '\*' +### MT1211: The simulator version '\*' does not support the simulator type '\*' +### MT1212: Failed to create a simulator version where type = * and runtime = *. +### MT1213: Invalid simulator specification for Xcode 4: * +### MT1214: Invalid simulator specification for Xcode 5: * +### MT1215: Invalid SDK specified: * +### MT1216: Could not find the simulator UDID '*'. +### MT1217: Could not load the app bundle at '*'. +### MT1218: No bundle identifier found in the app at '*'. +### MT1219: Could not find the simulator for '*'. +### MT1220: Could not find the latest simulator runtime for device '*'. This usually indicates a problem with Xcode. @@ -875,7 +871,7 @@ Things to try to fix this: * Pass an explicit SDK version using --sdk . * Reinstall Xcode. -

MT1221: Could not find the paired iPhone simulator for the WatchOS simulator '*'.

+### MT1221: Could not find the paired iPhone simulator for the WatchOS simulator '*'. When launching a WatchOS app in a WatchOS simulator, there must be a paired iOS Simulator as well. @@ -888,25 +884,25 @@ Watch simulators can be paired with iOS Simulators using Xcode's Devices UI (men --> -

MT1301 Native library `*` (*) was ignored since it does not match the current build architecture(s) (*)

+### MT1301 Native library `*` (\*) was ignored since it does not match the current build architecture(s) (\*) -

MT1302 Could not extract the native library '*' from '+'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary').

+### MT1302 Could not extract the native library '*' from '+'. Please ensure the native library was properly embedded in the managed assembly (if the assembly was built using a binding project, the native library must be included in the project, and its Build Action must be 'ObjcBindingNativeLibrary'). -

MT1303: Could not decompress the native framework '*' from '*'. Please review the build log for more information from the native 'zip' command.

+### MT1303: Could not decompress the native framework '\*' from '\*'. Please review the build log for more information from the native 'zip' command. Could not decompress the specified native framework from the binding library. Please review the bulid log for more information about this failure from the native 'zip' command. -

MT1304: The embedded framework '*' in * is invalid: it does not contain an Info.plist.

+### MT1304: The embedded framework '*' in * is invalid: it does not contain an Info.plist. The specified embedded framework does not contain an Info.plist, and is therefore not a valid framework. Please make sure the framework is valid. -

MT1305: The binding library '*' contains a user framework (*), but embedded user frameworks require iOS 8.0 (the current deployment target is *). Please set the deployment target in the Info.plist file to at least 8.0.

+### MT1305: The binding library '\*' contains a user framework (\*), but embedded user frameworks require iOS 8.0 (the current deployment target is *). Please set the deployment target in the Info.plist file to at least 8.0. The specified binding library contains an embedded framework, but Xamarin.iOS only supports embedded frameworks on iOS 8.0 or later. @@ -918,7 +914,7 @@ Please set the deployment target in the Info.plist file to at least 8.0 to solve MT14xx CrashReports.cs --> -

MT1400: Could not open crash report service: AFCConnectionOpen returned *

+### MT1400: Could not open crash report service: AFCConnectionOpen returned * An error occurred when trying to access crash reports from the device. @@ -930,7 +926,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1401: Could not close crash report service: AFCConnectionClose returned *

+### MT1401: Could not close crash report service: AFCConnectionClose returned * An error occurred when trying to access crash reports from the device. @@ -942,7 +938,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1402: Could not read file info for *: AFCFileInfoOpen returned *

+### MT1402: Could not read file info for *: AFCFileInfoOpen returned * An error occurred when trying to access crash reports from the device. @@ -954,7 +950,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1403: Could not read crash report: AFCDirectoryOpen (*) returned: *

+### MT1403: Could not read crash report: AFCDirectoryOpen (*) returned: * An error occurred when trying to access crash reports from the device. @@ -966,7 +962,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1404: Could not read crash report: AFCFileRefOpen (*) returned: *

+### MT1404: Could not read crash report: AFCFileRefOpen (*) returned: * An error occurred when trying to access crash reports from the device. @@ -978,7 +974,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1405: Could not read crash report: AFCFileRefRead (*) returned: *

+### MT1405: Could not read crash report: AFCFileRefRead (*) returned: * An error occurred when trying to access crash reports from the device. @@ -990,7 +986,7 @@ Things to try to solve this: * Reboot the Mac. * Synchronize the device with iTunes (this will remove any crash reports from the device). -

MT1406: Could not list crash reports: AFCDirectoryOpen (*) returned: *

+### MT1406: Could not list crash reports: AFCDirectoryOpen (*) returned: * An error occurred when trying to access crash reports from the device. @@ -1010,7 +1006,7 @@ Things to try to solve this: MT16xx MachO.cs --> -

MT1600: Not a Mach-O dynamic library (unknown header '0x*'): *.

+### MT1600: Not a Mach-O dynamic library (unknown header '0x*'): *. An error occurred while processing the dynamic library in question. @@ -1020,7 +1016,7 @@ The format of a library can be verified using the `file` command from a terminal file -arch all -l /path/to/library.dylib -

MT1601: Not a static library (unknown header '*'): *.

+### MT1601: Not a static library (unknown header '*'): *. An error occurred while processing the static library in question. @@ -1030,7 +1026,7 @@ The format of a library can be verified using the `file` command from a terminal file -arch all -l /path/to/library.a -

MT1602: Not a Mach-O dynamic library (unknown header '0x*'): *.

+### MT1602: Not a Mach-O dynamic library (unknown header '0x*'): *. An error occurred while processing the dynamic library in question. @@ -1040,7 +1036,7 @@ The format of a library can be verified using the `file` command from a terminal file -arch all -l /path/to/library.dylib -

MT1603: Unknown format for fat entry at position * in *.

+### MT1603: Unknown format for fat entry at position * in *. An error occurred while processing the fat archive in question. @@ -1050,7 +1046,7 @@ The format of a fat archive can be verified using the `file` command from a term file -arch all -l /path/to/file -

MT1604: File of type * is not a MachO file (*).

+### MT1604: File of type * is not a MachO file (*). An error occurred while processing the MachO file in question. @@ -1067,12 +1063,12 @@ The format of a file can be verified using the `file` command from a terminal: MT20xx Linker (general) errors --> -

MT2001 Could not link assemblies

+### MT2001 Could not link assemblies This error means that the managed linker encountered an unexpected error, e.g. an exception, and could not complete or save the assembly being processed. More information about the exact error will be part of the build log, e.g. ``` -error MT2001: Could not link assemblies. +error MT2001: Could not link assemblies. Method: `System.Void Todo.TodoListPageCS/<<-ctor>b__1_0>d::SetStateMachine(System.Runtime.CompilerServices.IAsyncStateMachine)` Assembly: `QuickTodo, Version=1.0.6297.28241, Culture=neutral, PublicKeyToken=null` Reason: Value cannot be null. @@ -1082,32 +1078,32 @@ Parameter name: instruction It is important to file a bug report for such issues. In most case a workaround can be provided until a proper fix is published. The above information is critical (along with a test case and/or the assembly binairy) to resolve the issue. -

MT2002 Can not resolve reference: *

+### MT2002 Can not resolve reference: * -

MT2003 Option '*' will be ignored since linking is disabled

+### MT2003 Option '*' will be ignored since linking is disabled -

MT2004 Extra linker definitions file '*' could not be located.

+### MT2004 Extra linker definitions file '*' could not be located. -

MT2005 Definitions from '*' could not be parsed.

+### MT2005 Definitions from '*' could not be parsed. -

MT2006: Can not load mscorlib.dll from: *. Please reinstall Xamarin.iOS.

+### MT2006: Can not load mscorlib.dll from: *. Please reinstall Xamarin.iOS. This generally indicates that there is a problem with your Xamarin.iOS installation. Please try reinstalling Xamarin.iOS. -

MT2010: Unknown HttpMessageHandler `*`. Valid values are HttpClientHandler (default), CFNetworkHandler or NSUrlSessionHandler

+### MT2010: Unknown HttpMessageHandler `*`. Valid values are HttpClientHandler (default), CFNetworkHandler or NSUrlSessionHandler -

MT2011: Unknown TlsProvider `*`. Valid values are default or appletls.

+### MT2011: Unknown TlsProvider `*`. Valid values are default or appletls. The value given to `tls-provider=` is not a valid TLS (Transport Layer Security) provider. @@ -1117,7 +1113,7 @@ The `default` and `appletls` are the only valid values and both represent the sa -

MT2015: Invalid HttpMessageHandler `*` for watchOS. The only valid value is NSUrlSessionHandler.

+### MT2015: Invalid HttpMessageHandler `*` for watchOS. The only valid value is NSUrlSessionHandler. This is a warning that occurs because the project file specifies an invalid HttpMessageHandler. @@ -1125,25 +1121,25 @@ Earlier versions of our preview tools generated by default an invalid value in t To fix this warning, open the project file in a text editor, and remove all HttpMessageHandler nodes from the XML. -

MT2016: Invalid TlsProvider `legacy` option. The only valid value `appletls` will be used.

+### MT2016: Invalid TlsProvider `legacy` option. The only valid value `appletls` will be used. The `legacy` provider, which was a fully managed SSLv3 / TLSv1 only provider, is not shipped with Xamarin.iOS anymore. Projects that were using this old provider and now build with the newer `appletls` one. To fix this warning, open the project file in a text editor, and remove all `MtouchTlsProvider`` nodes from the XML. -

MT2017: Could not process XML description.

+### MT2017: Could not process XML description. This means there is an error on the [custom XML linker configuration file](https://developer.xamarin.com/guides/cross-platform/advanced/custom_linking/) you provided, please review your file. -

MT2018: The assembly '*' is referenced from two different locations: '*' and '*'.

+### MT2018: The assembly '\*' is referenced from two different locations: '\*' and '*'. The assembly mentioned in the error message is loaded from multiple locations. Make sure to always use the same version of an assembly. -

MT2019: Can not load the root assembly '*'

+### MT2019: Can not load the root assembly '*' The root assembly could not be loaded. Please verify that the path in the error message refers to an existing file, and that it's a valid .NET assembly. -

MT202x: Binding Optimizer failed processing `...`.

+### MT202x: Binding Optimizer failed processing `...`. Something unexpected occured when trying to optimize generated binding code. The element causing the issue is named in the error message. In order to fix this issue the assembly named (or containing the type or method named) will need to be provided in a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). @@ -1152,7 +1148,7 @@ The last digit `x` will be: * `1` for a type name; * `3` for a method name; -

MT2030: Remove User Resources failed processing `...`.

+### MT2030: Remove User Resources failed processing `...`. Something unexpected occured when trying to remove user resources. The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). @@ -1161,23 +1157,23 @@ User resources are files included inside assemblies (as resources) that needs to * `__monotouch_content_*` and `__monotouch_pages_*` resources; and * Native libraries embedded inside a binding assembly; -

MT2040: Default HttpMessageHandler setter failed processing `...`.

+### MT2040: Default HttpMessageHandler setter failed processing `...`. Something unexpected occured when trying to set the default `HttpMessageHandler` for the application. Please file a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). -

MT2050: Code Remover failed processing `...`.

+### MT2050: Code Remover failed processing `...`. Something unexpected occured when trying to remove code from BCL shipping with the application. Please file a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). -

MT2060: Sealer failed processing `...`.

+### MT2060: Sealer failed processing `...`. Something unexpected occured when trying to seal types or methods (final) or when devirtualizing some methods. The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). -

MT2070: Metadata Reducer failed processing `...`.

+### MT2070: Metadata Reducer failed processing `...`. Something unexpected occured when trying to reduce the metadata from the application. The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). -

MT2080: MarkNSObjects failed processing `...`.

+### MT2080: MarkNSObjects failed processing `...`. Something unexpected occured when trying to mark `NSObject` subclasses from the application. The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](http://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). @@ -1189,13 +1185,13 @@ Something unexpected occured when trying to inline code from the application. Th -

MT2101: Can't resolve the reference '*', referenced from the method '*' in '*'.

+### MT2101: Can't resolve the reference '\*', referenced from the method '\*' in '*'. An invalid assembly reference was encountered when processing the method mentioned in the error message. The assembly causing the issue is named in the error message. In order to fix this issue the assembly will need to be provided in a [bug report](https://bugzilla.xamarin.com) along with a complete build log with verbosity enabled (i.e. `-v -v -v -v` in the **Additional mtouch arguments**). -

MT2102: Error processing the method '*' in the assembly '*': *

+### MT2102: Error processing the method '\*' in the assembly '\*': * Something unexpected occured when trying to mark the method mentioned in the error message. @@ -1208,37 +1204,39 @@ The assembly causing the issue is named in the error message. In order to fix th MT30xx AOT (general) errors --> -

MT3001 Could not AOT the assembly '*'

+### MT3001 Could not AOT the assembly '*' This generally indicates a bug in the AOT compiler. Please file a bug [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS) with a project that can be used to reproduce the error. Sometimes it's possible to work around this by disabling incremental builds in the project's iOS Build option (but it's still a bug, so please report it anyways). -

MT3002 AOT restriction: Method '*' must be static since it is decorated with [MonoPInvokeCallback]. See http://ios.xamarin.com/Documentation/Limitations#Reverse_Callbacks # this error message comes from the AOT compiler

+### MT3002 AOT restriction: Method '*' must be static since it is decorated with [MonoPInvokeCallback]. See [https://developer.xamarin.com/guides/ios/advanced_topics/limitations/#Reverse_Callbacks](https://developer.xamarin.com/guides/ios/advanced_topics/limitations/#Reverse_Callbacks) + +This error message comes from the AOT compiler. -

MT3003 Conflicting --debug and --llvm options. Soft-debugging is disabled.

+### MT3003 Conflicting --debug and --llvm options. Soft-debugging is disabled. Debugging is not supported when LLVM is enabled. If you need to debug the app, disable LLVM first. -

MT3004 Could not AOT the assembly '*' because it doesn't exist.

+### MT3004 Could not AOT the assembly '*' because it doesn't exist. -

MT3005 The dependency '*' of the assembly '*' was not found. Please review the project's references.

+### MT3005 The dependency '\*' of the assembly '\*' was not found. Please review the project's references. -This typically occurs when an assembly references another version of a platform assembly (usually the .NET 4 version of mscorlib.dll). +This typically occurs when an assembly references another version of a platform assembly (usually the .NET 4 version of mscorlib.dll). This is not supported, and may not build or execute properly (the assembly may use API from the .NET 4 version of mscorlib.dll that the Xamarin.iOS version does not have). -

MT3006 Could not compute a complete dependency map for the project. This will result in slower build times because Xamarin.iOS can't properly detect what needs to be rebuilt (and what does not need to be rebuilt). Please review previous warnings for more details.

+### MT3006 Could not compute a complete dependency map for the project. This will result in slower build times because Xamarin.iOS can't properly detect what needs to be rebuilt (and what does not need to be rebuilt). Please review previous warnings for more details. build or execute properly (the assembly may use API from the .NET 4 version of mscorlib.dll that the Xamarin.iOS version does not have). -

MT3007: Debug info files (*.mdb) will not be loaded when llvm is enabled.

+### MT3007: Debug info files (*.mdb) will not be loaded when llvm is enabled. -

MT3008: Bitcode support requires the use of the LLVM AOT backend (--llvm)

+### MT3008: Bitcode support requires the use of the LLVM AOT backend (--llvm) Bitcode support requires the use of the LLVM AOT backend (--llvm). @@ -1256,11 +1254,11 @@ Either disable Bitcode support or enable LLVM. MT40xx main.m --> -

MT4001 The main template could not be expanded to `*`.

+### MT4001 The main template could not be expanded to `*`. An error occurred when generating main.m. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4002 Failed to compile the generated code for P/Invoke methods. Please file a bug report at http://bugzilla.xamarin.com

+### MT4002 Failed to compile the generated code for P/Invoke methods. Please file a bug report at http://bugzilla.xamarin.com Failed to compile the generated code for P/Invoke methods. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). @@ -1270,149 +1268,149 @@ Failed to compile the generated code for P/Invoke methods. Please file a bug rep MT41xx registrar.m --> -

MT4101 The registrar cannot build a signature for type `*`.

+### MT4101 The registrar cannot build a signature for type `*`. A type was found in exported API that the runtime doesn't know how to marshal to/from Objective-C. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4102 The registrar found an invalid type `*` in signature for method `*`. Use `*` instead.

+### MT4102 The registrar found an invalid type `*` in signature for method `*`. Use `*` instead. This currently only happens with one type: System.DateTime. Use the Objective-C equivalent (NSDate) instead. -

MT4103 The registrar found an invalid type `*` in signature for method `*`: The type implements INativeObject, but does not have a constructor that takes two (IntPtr, bool) arguments

+### MT4103 The registrar found an invalid type `*` in signature for method `*`: The type implements INativeObject, but does not have a constructor that takes two (IntPtr, bool) arguments This occurs when the registrar encounter a type in a signature with the mentioned characteristics. The registrar might need to create new instances of the type, and in this case it requires a constructor with the (IntPtr, bool) signature - the first argument (IntPtr) specifies the managed handle, while the second if the caller hands over ownership of the native handle (if this value is false 'retain' will be called on the object). -

MT4104 The registrar cannot marshal the return value for type `*` in signature for method `*`.

+### MT4104 The registrar cannot marshal the return value for type `*` in signature for method `*`. A type was found in exported API that the runtime doesn't know how to marshal to/from Objective-C. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4105 The registrar cannot marshal the parameter of type `*` in signature for method `*`.

+### MT4105 The registrar cannot marshal the parameter of type `*` in signature for method `*`. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4106 The registrar cannot marshal the return value for structure `*` in signature for method `*`.

+### MT4106 The registrar cannot marshal the return value for structure `*` in signature for method `*`. A type was found in exported API that the runtime doesn't know how to marshal to/from Objective-C. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4107 The registrar cannot marshal the parameter of type `*` in signature for method `+`.

+### MT4107 The registrar cannot marshal the parameter of type `*` in signature for method `+`. A type was found in exported API that the runtime doesn't know how to marshal to/from Objective-C. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4108 The registrar cannot get the ObjectiveC type for managed type `*`."

+### MT4108 The registrar cannot get the ObjectiveC type for managed type `*`. A type was found in exported API that the runtime doesn't know how to marshal to/from Objective-C. If you believe Xamarin.iOS should support the type in question, please file an enhancement request at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com). -

MT4109 Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com

+### MT4109 Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com Failed to compile the generated code for the registrar. The build log will contain the output from the native compiler, explaining why the code isn't compiling. This is always a bug in Xamarin.iOS; please file a bug report at [http://bugzilla.xamarin.com](http://bugzilla.xamarin.com) with your project or a test case. -

MT4110 The registrar cannot marshal the out parameter of type `*` in signature for method `*`.

+### MT4110 The registrar cannot marshal the out parameter of type `*` in signature for method `*`. -

MT4111 The registrar cannot build a signature for type `*' in method `*`.

+### MT4111 The registrar cannot build a signature for type `*` in method `*`. -

MT4112 The registrar found an invalid type `*`. Registering generic types with ObjectiveC is not supported, and may lead to random behavior and/or crashes (for backwards compatibility with older versions of Xamarin.iOS it is possible to ignore this error by passing --unsupported--enable-generics-in-registrar as an additional mtouch argument in the project's iOS Build options page. See http://docs.xamarin.com/guides/ios/advanced_topics/registrar for more information).

+### MT4112 The registrar found an invalid type `*`. Registering generic types with Objective-C is not supported, and may lead to random behavior and/or crashes (for backwards compatibility with older versions of Xamarin.iOS it is possible to ignore this error by passing `--unsupported--enable-generics-in-registrar` as an additional mtouch argument in the project's iOS Build options page. See [developer.xamarin.com/guides/ios/advanced_topics/registrar](https://developer.xamarin.com/guides/ios/advanced_topics/registrar) for more information). -

MT4113 The registrar found a generic method: '*.*'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes.

+### MT4113 The registrar found a generic method: '\*.\*'. Exporting generic methods is not supported, and will lead to random behavior and/or crashes. -

MT4114 Unexpected error in the registrar for the method '*.*' - Please file a bug report at http://bugzilla.xamarin.com

+### MT4114 Unexpected error in the registrar for the method '\*.\*' - Please file a bug report at http://bugzilla.xamarin.com -

MT4116 Could not register the assembly '*': *

+### MT4116 Could not register the assembly '*': * -

MT4117 The registrar found a signature mismatch in the method '*.*' - the selector indicates the method takes * parameters, while the managed method has * parameters.

+### MT4117 The registrar found a signature mismatch in the method '*.*' - the selector indicates the method takes * parameters, while the managed method has * parameters. -

MT4118 Cannot register two managed types ('*' and '*') with the same native name ('*').

+### MT4118 Cannot register two managed types ('\*' and '\*') with the same native name ('*'). -

MT4119 Could not register the selector '*' of the member '*.*' because the selector is already registered on a different member.

+### MT4119 Could not register the selector '\*' of the member '\*.*' because the selector is already registered on a different member. -

MT4120 The registrar found an unknown field type '*' in field '*.*'. Please file a bug report at http://bugzilla.xamarin.com

+### MT4120 The registrar found an unknown field type '\*' in field '\*.*'. Please file a bug report at http://bugzilla.xamarin.com This error indicates a bug in Xamarin.iOS. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4121 Cannot use GCC/G++ to compile the generated code from the static registrar when using the Accounts framework (the header files provided by Apple used during the compilation require Clang). Either use Clang (--compiler:clang) or the dynamic registrar (--registrar:dynamic).

+### MT4121 Cannot use GCC/G++ to compile the generated code from the static registrar when using the Accounts framework (the header files provided by Apple used during the compilation require Clang). Either use Clang (--compiler:clang) or the dynamic registrar (--registrar:dynamic). -

MT4122 Cannot use the Clang compiler provided in the *.* SDK to compile the generated code from the static registrar when non-ASCII type names ('*') are present in the application. Either use GCC/G++ (--compiler:gcc|g++), the dynamic registrar (--registrar:dynamic) or a newer SDK.

+### MT4122 Cannot use the Clang compiler provided in the *.* SDK to compile the generated code from the static registrar when non-ASCII type names ('*') are present in the application. Either use GCC/G++ (--compiler:gcc|g++), the dynamic registrar (--registrar:dynamic) or a newer SDK. -

MT4123 The type of the variadic parameter in the variadic function '*' must be System.IntPtr.

+### MT4123 The type of the variadic parameter in the variadic function '*' must be System.IntPtr. -

MT4124 Invalid * found on '*'. Please file a bug report at http://bugzilla.xamarin.com

+### MT4124 Invalid * found on '*'. Please file a bug report at http://bugzilla.xamarin.com This error indicates a bug in Xamarin.iOS. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4125 The registrar found an invalid type '*' in signature for method '*': The interface must have a Protocol attribute specifying its wrapper type.

+### MT4125 The registrar found an invalid type '\*' in signature for method '\*': The interface must have a Protocol attribute specifying its wrapper type. -

MT4126 Cannot register two managed protocols ('*' and '*') with the same native name ('*').

+### MT4126 Cannot register two managed protocols ('\*' and '\*') with the same native name ('*'). -

MT4127 Cannot register more than one interface method for the method '*' (which is implementing '*').

+### MT4127 Cannot register more than one interface method for the method '\*' (which is implementing '\*'). -

MT4128 The registrar found an invalid generic parameter type '*' in the method '*'. The generic parameter must have an 'NSObject' constraint.

+### MT4128 The registrar found an invalid generic parameter type '\*' in the method '\*'. The generic parameter must have an 'NSObject' constraint. -

MT4129 The registrar found an invalid generic return type '*' in the method '*'. The generic return type must have an 'NSObject' constraint.

+### MT4129 The registrar found an invalid generic return type '\*' in the method '\*'. The generic return type must have an 'NSObject' constraint. -

MT4130 The registrar cannot export static methods in generic classes ('*').

+### MT4130 The registrar cannot export static methods in generic classes ('*'). -

MT4131 The registrar cannot export static properties in generic classes ('*.*').

+### MT4131 The registrar cannot export static properties in generic classes ('\*.\*'). -

MT4132 The registrar found an invalid generic return type '*' in the property '*'. The return type must have an 'NSObject' constraint.

+### MT4132 The registrar found an invalid generic return type '\*' in the property '\*'. The return type must have an 'NSObject' constraint. -

MT4133 Cannot construct an instance of the type '*' from Objective-C because the type is generic. [Runtime exception]

+### MT4133 Cannot construct an instance of the type '*' from Objective-C because the type is generic. [Runtime exception] -

MT4134 Your application is using the '*' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS *, while you're building with the iOS * SDK.) Please select a newer SDK in your app's iOS Build options.

+### MT4134 Your application is using the '*' framework, which isn't included in the iOS SDK you're using to build your app (this framework was introduced in iOS *, while you're building with the iOS * SDK.) Please select a newer SDK in your app's iOS Build options. -

MT4135 The member '*.*' has an Export attribute that doesn't specify a selector. A selector is required.

+### MT4135 The member '\*.\*' has an Export attribute that doesn't specify a selector. A selector is required. -

MT4136 The registrar cannot marshal the parameter type '*' of the parameter '*' in the method '*.*'

+### MT4136 The registrar cannot marshal the parameter type '\*' of the parameter '\*' in the method '\*.*' -

MT4138 The registrar cannot marshal the property type '*' of the property '*.*'.

+### MT4138 The registrar cannot marshal the property type '\*' of the property '\*.*'. -

MT4139 The registrar cannot marshal the property type '*' of the property '*.*'. Properties with the [Connect] attribute must have a property type of NSObject (or a subclass of NSObject).

+### MT4139 The registrar cannot marshal the property type '\*' of the property '\*.*'. Properties with the [Connect] attribute must have a property type of NSObject (or a subclass of NSObject). -

MT4140 The registrar found a signature mismatch in the method '*.*' - the selector indicates the variadic method takes * parameters, while the managed method has * parameters.

+### MT4140 The registrar found a signature mismatch in the method '*.*' - the selector indicates the variadic method takes * parameters, while the managed method has * parameters. -

MT4141 Cannot register the selector '*' on the member '*' because Xamarin.iOS implicitly registers this selector.

+### MT4141 Cannot register the selector '\*' on the member '\*' because Xamarin.iOS implicitly registers this selector. This occurs when subclassing a framework type, and trying to implement a 'retain', 'release' or 'dealloc' method: @@ -1452,70 +1450,70 @@ class MyCustomNSObject : MyNSObject In this case Xamarin.iOS will override `retain`, `release` and `dealloc` on the `MyNSObject` class, and there is no conflict. -

MT4142: Failed to register the type '*'.

-

MT4143: The ObjectiveC class '*' could not be registered, it does not seem to derive from any known ObjectiveC class (including NSObject).

-

MT4144: Cannot register the method '*' since it does not have an associated trampoline. Please file a bug report at http://bugzilla.xamarin.com.

+### MT4142: Failed to register the type '*'. +### MT4143: The ObjectiveC class '*' could not be registered, it does not seem to derive from any known ObjectiveC class (including NSObject). +### MT4144: Cannot register the method '*' since it does not have an associated trampoline. Please file a bug report at http://bugzilla.xamarin.com. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4145: Invalid enum '*': enums with the [Native] attribute must have a underlying enum type of either 'long' or 'ulong'.

-

MT4146: The Name parameter of the Registrar attribute on the class '*' ('*') contains an invalid character: '*' (*).

+### MT4145: Invalid enum '*': enums with the [Native] attribute must have a underlying enum type of either 'long' or 'ulong'. +### MT4146: The Name parameter of the Registrar attribute on the class '\*' ('\*') contains an invalid character: '\*' (\*). The name of an Objectice-C class can't contain whitespace, which means that the `Register` attribute on the corresponding managed class can't have a `Name` parameter can't contain whitespace either. Please verify that the `Register` attribute on the managed class mentioned in the error message does not contain any whitespace. -

MT4147: Detected a protocol inheriting from the JSExport protocol while using the dynamic registrar. It is not possible to export protocols to JavaScriptCore dynamically; the static registrar must be used (add '--registrar:static to the additional mtouch arguments in the project's iOS Build options to select the static registrar).

-

MT4148: The registrar found a generic protocol: '*'. Exporting generic protocols is not supported.

-

MT4149: Cannot register the method '*.*' because the type of the first parameter ('*') does not match the category type ('*').

-

MT4150: Cannot register the type '*' because the Type property ('*') in its Category attribute does not inherit from NSObject.

-

MT4151: Cannot register the type '*' because the Type property in its Category attribute isn't set.

-

MT4152: Cannot register the type '*' as a category because it implements INativeObject or subclasses NSObject.

-

MT4153: Cannot register the type '*' as a category because it's generic.

-

MT4154: Cannot register the method '*' as a category method because it's generic.

-

MT4155: Cannot register the method '*' with the selector '*' as a category method on '*' because the Objective-C already has an implementation for this selector.

-

MT4156: Cannot register two categories ('*' and '*') with the same native name ('*').

-

MT4157: Cannot register the category method '*' because at least one parameter is required (and its type must match the category type '*')

-

MT4158: Cannot register the constructor * in the category * because constructors in categories are not supported.

-

MT4159: Cannot register the method '*' as a category method because category methods must be static.

+### MT4147: Detected a protocol inheriting from the JSExport protocol while using the dynamic registrar. It is not possible to export protocols to JavaScriptCore dynamically; the static registrar must be used (add '--registrar:static to the additional mtouch arguments in the project's iOS Build options to select the static registrar). +### MT4148: The registrar found a generic protocol: '*'. Exporting generic protocols is not supported. +### MT4149: Cannot register the method '\*.\*' because the type of the first parameter ('\*') does not match the category type ('\*'). +### MT4150: Cannot register the type '\*' because the Type property ('\*') in its Category attribute does not inherit from NSObject. +### MT4151: Cannot register the type '*' because the Type property in its Category attribute isn't set. +### MT4152: Cannot register the type '*' as a category because it implements INativeObject or subclasses NSObject. +### MT4153: Cannot register the type '\*' as a category because it's generic. +### MT4154: Cannot register the method '\*' as a category method because it's generic. +### MT4155: Cannot register the method '\*' with the selector '\*' as a category method on '*' because the Objective-C already has an implementation for this selector. +### MT4156: Cannot register two categories ('\*' and '\*') with the same native name ('*'). +### MT4157: Cannot register the category method '\*' because at least one parameter is required (and its type must match the category type '\*') +### MT4158: Cannot register the constructor * in the category * because constructors in categories are not supported. +### MT4159: Cannot register the method '*' as a category method because category methods must be static. -

MT4160: Invalid character '*' (*) found in selector '*' for '*'.

+### MT4160: Invalid character '\*' (\*) found in selector '\*' for '\*'. -

MT4161: The registrar found an unsupported structure '*': All fields in a structure must also be structures (field '*' with type '{2}' is not a structure).

+### MT4161: The registrar found an unsupported structure '\*': All fields in a structure must also be structures (field '\*' with type '{2}' is not a structure). The registrar found a structure with unsupported fields. All fields in a structure that is exposed to Objective-C must also be structures (not classes). -

MT4162: The type '*' (used as * {2}) is not available in * * (it was introduced in * *)* Please build with a newer * SDK (usually done by using the most recent version of Xcode.

+### MT4162: The type '\*' (used as * {2}) is not available in * * (it was introduced in * *)\* Please build with a newer * SDK (usually done by using the most recent version of Xcode. The registrar found a type which is not included in the current SDK. Please upgrade Xcode. -

MT4163: Internal error in the registrar (*). Please file a bug report at http://bugzilla.xamarin.com

+### MT4163: Internal error in the registrar (*). Please file a bug report at http://bugzilla.xamarin.com This error indicates a bug in Xamarin.iOS. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4164: Cannot export the property '*' because its selector '*' is an Objective-C keyword. Please use a different name.

+### MT4164: Cannot export the property '\*' because its selector '\*' is an Objective-C keyword. Please use a different name. The selector for the property in question is not a valid Objective-C identifer. Please use a valid Objective-C identifier as selectors. -

MT4165: The registrar couldn't find the type 'System.Void' in any of the referenced assemblies.

+### MT4165: The registrar couldn't find the type 'System.Void' in any of the referenced assemblies. This error most likely indicates a bug in Xamarin.iOS. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4166: Cannot register the method '*' because the signature contains a type (*) that isn't a reference type.

+### MT4166: Cannot register the method '\*' because the signature contains a type (\*) that isn't a reference type. This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4167: Cannot register the method '*' because the signature contains a generic type (*) with a generic argument type that isn't an NSObject subclass (*).

+### MT4167: Cannot register the method '\*' because the signature contains a generic type (\*) with a generic argument type that isn't an NSObject subclass (*). This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT4168: Cannot register the type '{managed_name}' because its Objective-C name '{exported_name}' is an Objective-C keyword. Please use a different name.

+### MT4168: Cannot register the type '{managed\_name}' because its Objective-C name '{exported\_name}' is an Objective-C keyword. Please use a different name. The Objective-C name for the type in question is not a valid Objective-C identifier. @@ -1530,23 +1528,23 @@ Please use a valid Objective-C identifier. MT51xx compilation --> -

MT5101 Missing '*' compiler. Please install Xcode 'Command-Line Tools' component

+### MT5101 Missing '*' compiler. Please install Xcode 'Command-Line Tools' component -

MT5102 Failed to assemble the file '*'. Please file a bug report at http://bugzilla.xamarin.com

+### MT5102 Failed to assemble the file '*'. Please file a bug report at http://bugzilla.xamarin.com -

MT5103 Failed to compile the file '*'. Please file a bug report at http://bugzilla.xamarin.com

+### MT5103 Failed to compile the file '*'. Please file a bug report at http://bugzilla.xamarin.com -

MT5104 Could not find neither the '*' nor the '*' compiler. Please install Xcode 'Command-Line Tools' component

+### MT5104 Could not find neither the '\*' nor the '\*' compiler. Please install Xcode 'Command-Line Tools' component -

MT5106: Could not compile the file(s) '*'. Please file a bug report at http://bugzilla.xamarin.com

+### MT5106: Could not compile the file(s) '*'. Please file a bug report at http://bugzilla.xamarin.com This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). @@ -1556,156 +1554,148 @@ This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzil MT52xx linking --> -

MT5201 Native linking failed. Please review the build log and the user flags provided to gcc: *

+### MT5201 Native linking failed. Please review the build log and the user flags provided to gcc: * -

MT5202 Native linking failed. Please review the build log.

+### MT5202 Native linking failed. Please review the build log. -

MT5203 Native linking warning: *

+### MT5203 Native linking warning: * -

MT5209 Native linking error: *

+### MT5209 Native linking error: * -

MT5210: Native linking failed, undefined symbol: *. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.

+### MT5210: Native linking failed, undefined symbol: *. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in. -This happens when the native linker cannot find a symbol that is referenced somewhere. There are several reasons this may happen: +This happens when the native linker cannot find a symbol that is referenced somewhere. There are several reasons this may happen: + +* A third-party binding requires a framework, but the binding does not specify this in its `[LinkWith]` attribute. Solutions: + - If you're the author of the third-party binding, or have access to its source, modify the binding's `[LinkWith]` attribute to include the framework it needs: + + [LinkWith ("mylib.a", Frameworks = "SystemConfiguration")] + + - If you can't modify the third-party binding, you can manually link with the required framework by passing `-gcc_flags '-framework SystemFramework'` to `mtouch` (this is done by modifying the additional mtouch arguments in the project's iOS Build options page. Remember that this must be done for every project configuration). +* In some cases a managed binding is composed of several native libraries, and all must be included in the bindings. It is possible to have more than one native library in each binding project, so the solution is to just add all the required native libraries to the binding project. +* A managed binding refers to native symbols that don't exist in the native library. + This usually happens when a binding has existed for some time, and the native + code has been modified during that time so that a particular native class has + either been removed or renamed, while the binding has not been updated. +* A P/Invoke refers to a native symbol that does not exist. Starting with Xamarin.iOS 7.4 an MT5214 error will be reported for this case (see MT5214 for more information). +* A third-party binding / library was built using C++, but the binding does not specify this in its `[LinkWith]` attribute. This is usually fairly easy to recognize, because the symbols have are mangled C++ symbols (one common example is `__ZNKSt9exception4whatEv`). + - If you're the author of the third-party binding, or have access to its source, modify the binding's `[LinkWith]` attribute to set the `IsCxx` flag: + + [LinkWith ("mylib.a", IsCxx = true)] + + - If you can't modify the third-party binding, or you're linking manually with a third-party library, you can set the equivalent flag by passing -cxx to mtouch (this is done by modifying the additional mtouch arguments in the project's iOS Build options page. Remember that this must be done for every project configuration). -

MT5211: Native linking failed, undefined Objective-C class: *. The symbol '*' could not be found in any of the libraries or frameworks linked with your application.

+### MT5211: Native linking failed, undefined Objective-C class: \*. The symbol '\*' could not be found in any of the libraries or frameworks linked with your application. -This happens when the native linker cannot find an Objective-C class that is referenced somewhere. There are several reasons this may happen: the same as for [MT5210](#MT5210) and in addition:
    -
  • - A third-party binding bound an Objective-C protocol, but did not annotate it with the [Protocol] attribute in its api definition. Solutions: -
      -
    • Add the missing [Protocol] attribute: -
      [BaseType (typeof (NSObject))]
      -[Protocol] // Add this
      -public interface MyProtocol
      -{
      -}
      -
    • -
    -
  • -
+This happens when the native linker cannot find an Objective-C class that is referenced somewhere. There are several reasons this may happen: the same as for [MT5210](#MT5210) and in addition: + +* A third-party binding bound an Objective-C protocol, but did not annotate it with the [Protocol] attribute in its api definition. Solutions: + - Add the missing `[Protocol]` attribute: + + [BaseType (typeof (NSObject))] + [Protocol] // Add this + public interface MyProtocol + { + } -

MT5212: Native linking failed, duplicate symbol: *.

+### MT5212: Native linking failed, duplicate symbol: *. This happens when the native linker encounters duplicated symbols between all the native libraries. Following this error there may be one or more [MT5213](#MT5213) errors with the location for each occurrence of the symbol. Possible reasons for this error: -
    -
  • The same native library is included twice.
  • -
  • Two distinct native libraries happen to define the same symbols.
  • -
  • A native library is not correctly built, and contains the same symbol more than once. - You can confirm this by using the following set of commands from a terminal (replace i386 with x86_64/armv7/armv7s/arm64 according to which architecture you're building for): -
      # Native libraries are usually fat libraries, containing binary code for
    -  # several architectures in the same file. First we extract the binary 
    -  # code for the architecture we're interested in.
    -  lipo libNative.a -thin i386 -output libNative.i386.a
     
    -  # Now query the native library for the duplicated symbol.
    -  nm libNative.i386.a | fgrep 'SYMBOL'
    +* The same native library is included twice.
    +* Two distinct native libraries happen to define the same symbols.
    +* A native library is not correctly built, and contains the same symbol more than once.
    +  You can confirm this by using the following set of commands from a terminal (replace i386 with x86_64/armv7/armv7s/arm64 according to which architecture you're building for):
     
    -  # You can also list the object files inside the native library.
    -  # In most cases this will reveal duplicated object files.
    -  ar -t libNative.i386.a
    + # Native libraries are usually fat libraries, containing binary code for + # several architectures in the same file. First we extract the binary + # code for the architecture we're interested in. + lipo libNative.a -thin i386 -output libNative.i386.a - There are a few possible ways to fix this: -
      -
    • Request that the provider of the native library fix it and provide the updated version.
    • -
    • Fix it yourself by removing the extra object files (this only works if the problem is in fact duplicated object files) -
        # Find out if the library is a fat library, and which 
      -  # architectures it contains.
      -  lipo -info libNative.a
      +        # Now query the native library for the duplicated symbol.
      +        nm libNative.i386.a | fgrep 'SYMBOL'
       
      -  # Extract each architecture (i386/x86_64/armv7/armv7s/arm64) to a separate file
      -  lipo libNative.a -thin ARCH -output libNative.ARCH.a
      +        # You can also list the object files inside the native library.
      +        # In most cases this will reveal duplicated object files.
      +        ar -t libNative.i386.a
       
      -  # Extract the object files for the offending architecture
      -  # This will remove the duplicates by overwriting them
      -  # (since they have the same filename)
      -  mkdir -p ARCH
      -  cd ARCH
      -  ar -x ../libNative.ARCH.a
      +  There are a few possible ways to fix this:
       
      -  # Reassemble the object files in an .a
      -  ar -r ../libNative.ARCH.a *.o
      -  cd ..
      -
      -  # Reassemble the fat library
      -  lipo *.a -create -output libNative.a
      -
    • -
    • Ask the linker to remove unused code. Xamarin.iOS will do this automatically if all of the following conditions are met: -
        -
      • All third-party bindings' [LinkWith] attributes have enabled SmartLink: -
        [assembly: LinkWith ("libNative.a", SmartLink = true)]
        -
      • -
      • No -gcc_flags is passed to mtouch (in the additional mtouch arguments field of the project's iOS Build options).
      • -
      -
    • -
    • It's also possible to ask the linker directly to remove unused code by adding `-gcc_flags -dead_strip` to the additional mtouch arguments in the project's iOS Build options.
    • -
    -
  • -
+ - Request that the provider of the native library fix it and provide the updated version. + - Fix it yourself by removing the extra object files (this only works if the problem is in fact duplicated object files) -

MT5213: Duplicate symbol in: * (Location related to previous error)

+ # Find out if the library is a fat library, and which + # architectures it contains. + lipo -info libNative.a + + # Extract each architecture (i386/x86_64/armv7/armv7s/arm64) to a separate file + lipo libNative.a -thin ARCH -output libNative.ARCH.a + + # Extract the object files for the offending architecture + # This will remove the duplicates by overwriting them + # (since they have the same filename) + mkdir -p ARCH + cd ARCH + ar -x ../libNative.ARCH.a + + # Reassemble the object files in an .a + ar -r ../libNative.ARCH.a *.o + cd .. + + # Reassemble the fat library + lipo *.a -create -output libNative.a + + + - Ask the linker to remove unused code. Xamarin.iOS will do this automatically if all of the following conditions are met: + - All third-party bindings' `[LinkWith]` attributes have enabled SmartLink: + + [assembly: LinkWith ("libNative.a", SmartLink = true)] + + - No `-gcc_flags` is passed to mtouch (in the additional mtouch arguments field of the project's iOS Build options). + - It's also possible to ask the linker directly to remove unused code by adding `-gcc_flags -dead_strip` to the additional mtouch arguments in the project's iOS Build options. + + +### MT5213: Duplicate symbol in: * (Location related to previous error) This error is reported only together with [MT5212](#MT5212). Please see [MT5212](#MT5212) for more information. -

MT5214 Native linking failed, undefined symbol: *. This symbol was referenced the managed member *. Please verify that all the necessary frameworks have been referenced and native libraries linked.

+### MT5214 Native linking failed, undefined symbol: *. This symbol was referenced the managed member *. Please verify that all the necessary frameworks have been referenced and native libraries linked. This error is reported when the managed code contains a P/Invoke to a native method that does not exist. For example: ``` -using System.Runtime.InteropServices; -class MyImports { - [DllImport ("__Internal")] - public static extern void MyInexistentFunc (); +using System.Runtime.InteropServices; +class MyImports { + [DllImport ("__Internal")] + public static extern void MyInexistentFunc (); } ``` There are a few possible solutions: - - Remove the P/Invokes in question from the source code. - - Enable the managed linker for all assemblies (this is done in the project's iOS Build options, by setting "Linker Behavior" to "All assemblies"). This will effectively remove all the P/Invokes you don't use from the app (automatically, instead of manually like the previous point). The downside is that this will make your simulator builds somewhat slower, and it may break your app if it's using reflection - more information about the linker can be found [here](/guides/ios/advanced_topics/linker/) ) - - Create a second native library which contains the missing native symbols. Note that this is merely a workaround (if you happen to try to call those functions, your app will crash). + - Remove the P/Invokes in question from the source code. + - Enable the managed linker for all assemblies (this is done in the project's iOS Build options, by setting "Linker Behavior" to "All assemblies"). This will effectively remove all the P/Invokes you don't use from the app (automatically, instead of manually like the previous point). The downside is that this will make your simulator builds somewhat slower, and it may break your app if it's using reflection - more information about the linker can be found [here](/guides/ios/advanced_topics/linker/) ) + - Create a second native library which contains the missing native symbols. Note that this is merely a workaround (if you happen to try to call those functions, your app will crash). -

MT5215: References to '*' might require additional -framework=XXX or -lXXX instructions to the native linker

+### MT5215: References to '*' might require additional -framework=XXX or -lXXX instructions to the native linker This is a warning, indicating that a P/Invoke was detected to reference the library in question, but the app is not linking with it. -

MT5216: Native linking failed for *. Please file a bug report at http://bugzilla.xamarin.com

+### MT5216: Native linking failed for *. Please file a bug report at http://bugzilla.xamarin.com This error is reported when linking the output from the AOT compiler. This error most likely indicates a bug in Xamarin.iOS. Please file a bug report at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT5217: Native linking possibly failed because the linker command line was too long (* characters).

+### MT5217: Native linking possibly failed because the linker command line was too long (* characters). Native linking failed, and it's possible this occured because the linker command was too long. @@ -1731,6 +1721,7 @@ There are a few possible sources for such dynamic symbols: registrar). Possible solutions: + * Enable the managed linker (if possible for all assemblies instead of only SDK assemblies). This might remove enough of the sources for dynamic symbols so that the linker's command-line doesn't exceeded the maximum. @@ -1760,7 +1751,7 @@ Possible solutions: keep referenced Objective-C classes. Thus disabling incremental builds will prevent this need. -

MT5218: Can't ignore the dynamic symbol {symbol} (--ignore-dynamic-symbol={symbol}) because it was not detected as a dynamic symbol.

+### MT5218: Can't ignore the dynamic symbol {symbol} (--ignore-dynamic-symbol={symbol}) because it was not detected as a dynamic symbol. The command-line argument `--ignore-dynamic-symbol=symbol` was passed, but this symbol is not a symbol that was recognized as a dynamic symbol that must @@ -1780,31 +1771,31 @@ There are two main reasons for this: MT53xx other tools --> -

MT5301: Missing 'strip' tool. Please install Xcode 'Command-Line Tools' component

+### MT5301: Missing 'strip' tool. Please install Xcode 'Command-Line Tools' component -

MT5302: Missing 'dsymutil' tool. Please install Xcode 'Command-Line Tools' component

+### MT5302: Missing 'dsymutil' tool. Please install Xcode 'Command-Line Tools' component -

MT5303: Failed to generate the debug symbols (dSYM directory). Please review the build log.

+### MT5303: Failed to generate the debug symbols (dSYM directory). Please review the build log. An error occurred when running dsymutil on the final .app directory to create the debug symbols. Please review the build log to see dsymutil's output and see how it can be fixed. -

MT5304: Failed to strip the final binary. Please review the build log.

+### MT5304: Failed to strip the final binary. Please review the build log. An error occurred when running the 'strip' tool to remove debugging information from the application. -

MT5305: Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component

+### MT5305: Missing 'lipo' tool. Please install Xcode 'Command-Line Tools' component -

MT5306: Failed to create the a fat library. Please review the build log.

+### MT5306: Failed to create the a fat library. Please review the build log. An error occurred when running the 'lipo' tool. Please review the build log to see the error reported by 'lipo'. -

MT5307: Failed to sign the executable. Please review the build log.

+### MT5307: Failed to sign the executable. Please review the build log. An error occurred when signing the application. Please review the build log to see the error reported by 'codesign'. @@ -1821,13 +1812,13 @@ An error occurred when signing the application. Please review the build log to s MT600x Stripper --> -

MT6001: Running version of Cecil doesn't support assembly stripping

+### MT6001: Running version of Cecil doesn't support assembly stripping -

MT6002: Could not strip assembly `*`.

+### MT6002: Could not strip assembly `*`. An error occurred when stripping managed code(removing the IL code) from the assemblies in the application. -

MT6003: [UnauthorizedAccessException message]

+### MT6003: [UnauthorizedAccessException message] A security error ocurred while stripping debugging symbols from the application. @@ -1837,194 +1828,194 @@ A security error ocurred while stripping debugging symbols from the application. MT7xxx msbuild errors --> -

MT7001: Could not resolve host IPs for WiFi debugger settings.

+### MT7001: Could not resolve host IPs for WiFi debugger settings. *MSBuild task: DetectDebugNetworkConfigurationTaskBase* -Troubleshooting steps: +Troubleshooting steps: - try to run `csharp -e 'System.Net.Dns.GetHostEntry (System.Net.Dns.GetHostName ()).AddressList'` (that should give you an IP address and not an error obviously). - try to run "ping \`hostname\`" which might give you more information, like: `cannot resolve MyHost.local: Unknown host` In some cases, it's a "local network" issue and it can be addressed by adding the unknown host `127.0.0.1 MyHost.local` in `/etc/hosts`. -

MT7002: This machine does not have any network adapters. This is required when debugging or profiling on device over WiFi.

+### MT7002: This machine does not have any network adapters. This is required when debugging or profiling on device over WiFi. *MSBuild task: DetectDebugNetworkConfigurationTaskBase* -

MT7003: The App Extension '*' does not contain an Info.plist.

+### MT7003: The App Extension '*' does not contain an Info.plist. *MSBuild task: ValidateAppBundleTaskBase* -

MT7004: The App Extension '*' does not specify a CFBundleIdentifier.

+### MT7004: The App Extension '*' does not specify a CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7005: The App Extension '*' does not specify a CFBundleExecutable.

+### MT7005: The App Extension '*' does not specify a CFBundleExecutable. *MSBuild task: ValidateAppBundleTaskBase* -

MT7006: The App Extension '*' has an invalid CFBundleIdentifier (*), it does not begin with the main app bundle's CFBundleIdentifier (*).

+### MT7006: The App Extension '\*' has an invalid CFBundleIdentifier (\*), it does not begin with the main app bundle's CFBundleIdentifier (*). *MSBuild task: ValidateAppBundleTaskBase* -

MT7007: The App Extension '*' has a CFBundleIdentifier (*) that ends with the illegal suffix ".key".

+### MT7007: The App Extension '\*' has a CFBundleIdentifier (\*) that ends with the illegal suffix ".key". *MSBuild task: ValidateAppBundleTaskBase* -

MT7008: The App Extension '*' does not specify a CFBundleShortVersionString.

+### MT7008: The App Extension '*' does not specify a CFBundleShortVersionString. *MSBuild task: ValidateAppBundleTaskBase* -

MT7009: The App Extension '*' has an invalid Info.plist: it does not contain an NSExtension dictionary.

+### MT7009: The App Extension '*' has an invalid Info.plist: it does not contain an NSExtension dictionary. *MSBuild task: ValidateAppBundleTaskBase* -

MT7010: The App Extension '*' has an invalid Info.plist: the NSExtension dictionary does not contain an NSExtensionPointIdentifier value.

+### MT7010: The App Extension '*' has an invalid Info.plist: the NSExtension dictionary does not contain an NSExtensionPointIdentifier value. *MSBuild task: ValidateAppBundleTaskBase* -

MT7011: The WatchKit Extension '*' has an invalid Info.plist: the NSExtension dictionary does not contain an NSExtensionAttributes dictionary.

+### MT7011: The WatchKit Extension '*' has an invalid Info.plist: the NSExtension dictionary does not contain an NSExtensionAttributes dictionary. *MSBuild task: ValidateAppBundleTaskBase* -

MT7012: The WatchKit Extension '*' does not have exactly one watch app.

+### MT7012: The WatchKit Extension '*' does not have exactly one watch app. *MSBuild task: ValidateAppBundleTaskBase* -

MT7013: The WatchKit Extension '*' has an invalid Info.plist: UIRequiredDeviceCapabilities must contain the 'watch-companion' capability.

+### MT7013: The WatchKit Extension '*' has an invalid Info.plist: UIRequiredDeviceCapabilities must contain the 'watch-companion' capability. *MSBuild task: ValidateAppBundleTaskBase* -

MT7014: The Watch App '*' does not contain an Info.plist.

+### MT7014: The Watch App '*' does not contain an Info.plist. *MSBuild task: ValidateAppBundleTaskBase* -

MT7015: The Watch App '*' does not specify a CFBundleIdentifier.

+### MT7015: The Watch App '*' does not specify a CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7016: The Watch App '*' has an invalid CFBundleIdentifier (*), it does not begin with the main app bundle's CFBundleIdentifier (*).

+### MT7016: The Watch App '\*' has an invalid CFBundleIdentifier (\*), it does not begin with the main app bundle's CFBundleIdentifier (*). *MSBuild task: ValidateAppBundleTaskBase* -

MT7017: The Watch App '*' does not have a valid UIDeviceFamily value. Expected 'Watch (4)' but found '* (*)'.

+### MT7017: The Watch App '\*' does not have a valid UIDeviceFamily value. Expected 'Watch (4)' but found '\* (*)'. *MSBuild task: ValidateAppBundleTaskBase* -

MT7018: The Watch App '*' does not specify a CFBundleExecutable

+### MT7018: The Watch App '*' does not specify a CFBundleExecutable *MSBuild task: ValidateAppBundleTaskBase* -

MT7019: The Watch App '*' has an invalid WKCompanionAppBundleIdentifier value ('*'), it does not match the main app bundle's CFBundleIdentifier ('*').

+### MT7019: The Watch App '\*' has an invalid WKCompanionAppBundleIdentifier value ('\*'), it does not match the main app bundle's CFBundleIdentifier ('*'). *MSBuild task: ValidateAppBundleTaskBase* -

MT7020: The Watch App '*' has an invalid Info.plist: the WKWatchKitApp key must be present and have a value of 'true'.

+### MT7020: The Watch App '*' has an invalid Info.plist: the WKWatchKitApp key must be present and have a value of 'true'. *MSBuild task: ValidateAppBundleTaskBase* -

MT7021: The Watch App '*' has an invalid Info.plist: the LSRequiresIPhoneOS key must not be present.

+### MT7021: The Watch App '*' has an invalid Info.plist: the LSRequiresIPhoneOS key must not be present. *MSBuild task: ValidateAppBundleTaskBase* -

MT7022: The Watch App '*' does not contain a Watch Extension.

+### MT7022: The Watch App '*' does not contain a Watch Extension. *MSBuild task: ValidateAppBundleTaskBase* -

MT7023: The Watch Extension '*' does not contain an Info.plist.

+### MT7023: The Watch Extension '*' does not contain an Info.plist. *MSBuild task: ValidateAppBundleTaskBase* -

MT7024: The Watch Extension '*' does not specify a CFBundleIdentifier.

+### MT7024: The Watch Extension '*' does not specify a CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7025: The Watch Extension '*' does not specify a CFBundleExecutable.

+### MT7025: The Watch Extension '*' does not specify a CFBundleExecutable. *MSBuild task: ValidateAppBundleTaskBase* -

MT7026: The Watch Extension '*' has an invalid CFBundleIdentifier (*), it does not begin with the main app bundle's CFBundleIdentifier (*).

+### MT7026: The Watch Extension '\*' has an invalid CFBundleIdentifier (\*), it does not begin with the main app bundle's CFBundleIdentifier (*). *MSBuild task: ValidateAppBundleTaskBase* -

MT7027: The Watch Extension '*' has a CFBundleIdentifier (*) that ends with the illegal suffix ".key".

+### MT7027: The Watch Extension '\*' has a CFBundleIdentifier (\*) that ends with the illegal suffix ".key". *MSBuild task: ValidateAppBundleTaskBase* -

MT7028: The Watch Extension '*' has an invalid Info.plist: it does not contain an NSExtension dictionary.

+### MT7028: The Watch Extension '*' has an invalid Info.plist: it does not contain an NSExtension dictionary. *MSBuild task: ValidateAppBundleTaskBase* -

MT7029: The Watch Extension '*' has an invalid Info.plist: the NSExtensionPointIdentifier must be "com.apple.watchkit".

+### MT7029: The Watch Extension '*' has an invalid Info.plist: the NSExtensionPointIdentifier must be "com.apple.watchkit". *MSBuild task: ValidateAppBundleTaskBase* -

MT7030: The Watch Extension '*' has an invalid Info.plist: the NSExtension dictionary must contain NSExtensionAttributes.

+### MT7030: The Watch Extension '*' has an invalid Info.plist: the NSExtension dictionary must contain NSExtensionAttributes. *MSBuild task: ValidateAppBundleTaskBase* -

MT7031: The Watch Extension '*' has an invalid Info.plist: the NSExtensionAttributes dictionary must contain a WKAppBundleIdentifier.

+### MT7031: The Watch Extension '*' has an invalid Info.plist: the NSExtensionAttributes dictionary must contain a WKAppBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7032: The WatchKit Extension '*' has an invalid Info.plist: UIRequiredDeviceCapabilities should not contain the 'watch-companion' capability.

+### MT7032: The WatchKit Extension '*' has an invalid Info.plist: UIRequiredDeviceCapabilities should not contain the 'watch-companion' capability. *MSBuild task: ValidateAppBundleTaskBase* -

MT7033: The Watch App '*' does not contain an Info.plist.

+### MT7033: The Watch App '*' does not contain an Info.plist. *MSBuild task: ValidateAppBundleTaskBase* -

MT7034: The Watch App '*' does not specify a CFBundleIdentifier.

+### MT7034: The Watch App '*' does not specify a CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7035: The Watch App '*' does not have a valid UIDeviceFamily value. Expected '*' but found '* (*)'.

+### MT7035: The Watch App '\*' does not have a valid UIDeviceFamily value. Expected '\*' but found '\* (\*)'. *MSBuild task: ValidateAppBundleTaskBase* -

MT7036: The Watch App '*' does not specify a CFBundleExecutable.

+### MT7036: The Watch App '*' does not specify a CFBundleExecutable. *MSBuild task: ValidateAppBundleTaskBase* -

MT7037: The WatchKit Extension '{extensionName}' has an invalid WKAppBundleIdentifier value ('*'), it does not match the Watch App's CFBundleIdentifier ('*').

+### MT7037: The WatchKit Extension '{extensionName}' has an invalid WKAppBundleIdentifier value ('\*'), it does not match the Watch App's CFBundleIdentifier ('\*'). *MSBuild task: ValidateAppBundleTaskBase* -

MT7038: The Watch App '*' has an invalid Info.plist: the WKCompanionAppBundleIdentifier must exist and must match the main app bundle's CFBundleIdentifier.

+### MT7038: The Watch App '*' has an invalid Info.plist: the WKCompanionAppBundleIdentifier must exist and must match the main app bundle's CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7039: The Watch App '*' has an invalid Info.plist: the LSRequiresIPhoneOS key must not be present.

+### MT7039: The Watch App '*' has an invalid Info.plist: the LSRequiresIPhoneOS key must not be present. *MSBuild task: ValidateAppBundleTaskBase* -

MT7040: The app bundle {AppBundlePath} does not contain an Info.plist.

+### MT7040: The app bundle {AppBundlePath} does not contain an Info.plist. *MSBuild task: ValidateAppBundleTaskBase* -

MT7041: Main Info.plist path does not specify a CFBundleIdentifier.

+### MT7041: Main Info.plist path does not specify a CFBundleIdentifier. *MSBuild task: ValidateAppBundleTaskBase* -

MT7042: Main Info.plist path does not specify a CFBundleExecutable.

+### MT7042: Main Info.plist path does not specify a CFBundleExecutable. *MSBuild task: ValidateAppBundleTaskBase* -

MT7043: Main Info.plist path does not specify a CFBundleSupportedPlatforms.

+### MT7043: Main Info.plist path does not specify a CFBundleSupportedPlatforms. *MSBuild task: ValidateAppBundleTaskBase* -

MT7044: Main Info.plist path does not specify a UIDeviceFamily.

+### MT7044: Main Info.plist path does not specify a UIDeviceFamily. *MSBuild task: ValidateAppBundleTaskBase* -

MT7045: Unrecognized Format: *.

+### MT7045: Unrecognized Format: *. *MSBuild task: PropertyListEditorTaskBase* -Where * can be: +Where * can be: - string - array @@ -2035,91 +2026,91 @@ Where * can be: - date - data -

MT7046: Add: Entry, *, Incorrectly Specified.

+### MT7046: Add: Entry, *, Incorrectly Specified. *MSBuild task: PropertyListEditorTaskBase* -

MT7047: Add: Entry, *, Contains Invalid Array Index.

+### MT7047: Add: Entry, *, Contains Invalid Array Index. *MSBuild task: PropertyListEditorTaskBase* -

MT7048: Add: * Entry Already Exists.

+### MT7048: Add: * Entry Already Exists. *MSBuild task: PropertyListEditorTaskBase* -

MT7049: Add: Can't Add Entry, *, to Parent.

+### MT7049: Add: Can't Add Entry, *, to Parent. *MSBuild task: PropertyListEditorTaskBase* -

MT7050: Delete: Can't Delete Entry, *, from Parent.

+### MT7050: Delete: Can't Delete Entry, *, from Parent. *MSBuild task: PropertyListEditorTaskBase* -

MT7051: Delete: Entry, *, Contains Invalid Array Index.

+### MT7051: Delete: Entry, *, Contains Invalid Array Index. *MSBuild task: PropertyListEditorTaskBase* -

MT7052: Delete: Entry, *, Does Not Exist.

+### MT7052: Delete: Entry, *, Does Not Exist. *MSBuild task: PropertyListEditorTaskBase* -

MT7053: Import: Entry, *, Incorrectly Specified.

+### MT7053: Import: Entry, *, Incorrectly Specified. *MSBuild task: PropertyListEditorTaskBase* -

MT7054: Import: Entry, *, Contains Invalid Array Index.

+### MT7054: Import: Entry, *, Contains Invalid Array Index. *MSBuild task: PropertyListEditorTaskBase* -

MT7055: Import: Error Reading File: *.

+### MT7055: Import: Error Reading File: *. *MSBuild task: PropertyListEditorTaskBase* -

MT7056: Import: Can't Add Entry, *, to Parent.

+### MT7056: Import: Can't Add Entry, *, to Parent. *MSBuild task: PropertyListEditorTaskBase* -

MT7057: Merge: Can't Add array Entries to dict.

+### MT7057: Merge: Can't Add array Entries to dict. *MSBuild task: PropertyListEditorTaskBase* -

MT7058: Merge: Specified Entry Must Be a Container.

+### MT7058: Merge: Specified Entry Must Be a Container. *MSBuild task: PropertyListEditorTaskBase* -

MT7059: Merge: Entry, *, Contains Invalid Array Index.

+### MT7059: Merge: Entry, *, Contains Invalid Array Index. *MSBuild task: PropertyListEditorTaskBase* -

MT7060: Merge: Entry, *, Does Not Exist.

+### MT7060: Merge: Entry, *, Does Not Exist. *MSBuild task: PropertyListEditorTaskBase* -

MT7061: Merge: Error Reading File: *.

+### MT7061: Merge: Error Reading File: *. *MSBuild task: PropertyListEditorTaskBase* -

MT7062: Set: Entry, *, Incorrectly Specified.

+### MT7062: Set: Entry, *, Incorrectly Specified. *MSBuild task: PropertyListEditorTaskBase* -

MT7063: Set: Entry, *, Contains Invalid Array Index.

+### MT7063: Set: Entry, *, Contains Invalid Array Index. *MSBuild task: PropertyListEditorTaskBase* -

MT7064: Set: Entry, *, Does Not Exist.

+### MT7064: Set: Entry, *, Does Not Exist. *MSBuild task: PropertyListEditorTaskBase* -

MT7065: Unknown PropertyList editor action: *.

+### MT7065: Unknown PropertyList editor action: *. *MSBuild task: PropertyListEditorTaskBase* -

MT7066: Error loading '*': *.

+### MT7066: Error loading '*': *. *MSBuild task: PropertyListEditorTaskBase* -

MT7067: Error saving '*': *.

+### MT7067: Error saving '*': *. *MSBuild task: PropertyListEditorTaskBase* @@ -2131,63 +2122,63 @@ Where * can be: MT800x misc --> -

MT8001 Version mismatch between the native Xamarin.iOS runtime and monotouch.dll. Please reinstall Xamarin.iOS.

+### MT8001 Version mismatch between the native Xamarin.iOS runtime and monotouch.dll. Please reinstall Xamarin.iOS. -

MT8002 Could not find the method '*' in the type '*'.

+### MT8002 Could not find the method '\*' in the type '\*'. -

MT8003 Failed to find the closed generic method '*' on the type '*'.

+### MT8003 Failed to find the closed generic method '\*' on the type '\*'. -

MT8004: Cannot create an instance of * for the native object 0x* (of type '*'), because another instance already exists for this native object (of type *).

+### MT8004: Cannot create an instance of * for the native object 0x* (of type '*'), because another instance already exists for this native object (of type *). -

MT8005: Wrapper type '*' is missing its native ObjectiveC class '*'.

+### MT8005: Wrapper type '\*' is missing its native ObjectiveC class '\*'. -

MT8006: Failed to find the selector '*' on the type '*'

+### MT8006: Failed to find the selector '\*' on the type '\*' -

MT8007: Cannot get the method descriptor for the selector '*' on the type '*', because the selector does not correspond to a method

+### MT8007: Cannot get the method descriptor for the selector '\*' on the type '\*', because the selector does not correspond to a method -

MT8008: The loaded version of Xamarin.iOS.dll was compiled for * bits, while the process is * bits. Please file a bug at http://bugzilla.xamarin.com.

+### MT8008: The loaded version of Xamarin.iOS.dll was compiled for * bits, while the process is * bits. Please file a bug at http://bugzilla.xamarin.com. This indicates something is wrong in the build process. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8009: Unable to locate the block to delegate conversion method for the method *.*'s parameter #*. Please file a bug at http://bugzilla.xamarin.com.

+### MT8009: Unable to locate the block to delegate conversion method for the method *.*'s parameter #*. Please file a bug at http://bugzilla.xamarin.com. This indicates an API wasn't bound correctly. If this is an API exposed by Xamarin, please file a bug in our bugzilla ([http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS)), if it's a third-party binding, please contact the vendor. -

MT8010: Native type size mismatch between Xamarin.[iOS|Mac].dll and the executing architecture. Xamarin.[iOS|Mac].dll was built for *-bit, while the current process is *-bit.

+### MT8010: Native type size mismatch between Xamarin.[iOS|Mac].dll and the executing architecture. Xamarin.[iOS|Mac].dll was built for *-bit, while the current process is *-bit. This indicates something is wrong in the build process. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8011: Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method *.*. Please file a bug at http://bugzilla.xamarin.com.

+### MT8011: Unable to locate the delegate to block conversion attribute ([DelegateProxy]) for the return value for the method *.*. Please file a bug at http://bugzilla.xamarin.com. Xamarin.iOS was unable to locate a required method at runtime (to convert a delegate to a block). This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8012: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType is null. Please file a bug at http://bugzilla.xamarin.com.

+### MT8012: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType is null. Please file a bug at http://bugzilla.xamarin.com. The DelegateProxy attribute for the method in question is invalid. This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8013: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at http://bugzilla.xamarin.com.

+### MT8013: Invalid DelegateProxyAttribute for the return value for the method *.*: DelegateType ({2}) specifies a type without a 'Handler' field. Please file a bug at http://bugzilla.xamarin.com. The DelegateProxy attribute for the method in question is invalid. This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8014: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at http://bugzilla.xamarin.com.

+### MT8014: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is null. Please file a bug at http://bugzilla.xamarin.com. The DelegateProxy attribute for the method in question is invalid. This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8015: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com.

+### MT8015: Invalid DelegateProxyAttribute for the return value for the method *.*: The DelegateType's ({2}) 'Handler' field is not a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com. The DelegateProxy attribute for the method in question is invalid. This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8016: Unable to convert delegate to block for the return value for the method *.*, because the input isn't a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com.

+### MT8016: Unable to convert delegate to block for the return value for the method *.*, because the input isn't a delegate, it's a *. Please file a bug at http://bugzilla.xamarin.com. The DelegateProxy attribute for the method in question is invalid. @@ -2195,26 +2186,26 @@ This usually indicates a bug in Xamarin.iOS; please file a bug at [http://bugzil -

MT8018: Internal consistency error. Please file a bug report at http://bugzilla.xamarin.com.

+### MT8018: Internal consistency error. Please file a bug report at http://bugzilla.xamarin.com. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8019: Could not find the assembly * in the loaded assemblies.

+### MT8019: Could not find the assembly * in the loaded assemblies. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8020: Could not find the module with MetadataToken * in the assembly *.

+### MT8020: Could not find the module with MetadataToken * in the assembly *. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8021: Unknown implicit token type: *.

+### MT8021: Unknown implicit token type: *. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8022: Expected the token reference * to be a *, but it's a *. Please file a bug report at http://bugzilla.xamarin.com.

+### MT8022: Expected the token reference * to be a *, but it's a *. Please file a bug report at http://bugzilla.xamarin.com. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). -

MT8023: An instance object is required to construct a closed generic method for the open generic method: * (token reference: *). Please file a bug report at http://bugzilla.xamarin.com.

+### MT8023: An instance object is required to construct a closed generic method for the open generic method: * (token reference: *). Please file a bug report at http://bugzilla.xamarin.com. This indicates a bug in Xamarin.iOS. Please file a bug at [http://bugzilla.xamarin.com](https://bugzilla.xamarin.com/enter_bug.cgi?product=iOS). diff --git a/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs b/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs index 5d2adc6bf4..84bc20c741 100644 --- a/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs +++ b/docs/website/xamarin-analysis-doc-tool/xamarin-analysis-doc.cs @@ -29,8 +29,11 @@ namespace XamarinAnalysisDoc static void GenerateAnalysisDoc (string path) { - var section = "id:{c29b69f5-08e4-4dcc-831e-7fd692ab0886}\n"; - section += "title:Xamarin.iOS Analysis Rules\n\n"; + var section = "---\n"; + section += "id: c29b69f5-08e4-4dcc-831e-7fd692ab0886\n"; + section += "title: Xamarin.iOS Analysis Rules\n"; + section += "dateupdated: " + DateTime.Now.ToString("yyyy-MM-dd") + "\n"; + section += "---\n\n"; section += "[//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/)\n"; section += "[//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes)\n"; section += "[//]: # (Modifications outside of xamarin-macios/master will be lost on future updates)\n\n"; @@ -45,11 +48,11 @@ namespace XamarinAnalysisDoc var ruleID = rule [0]; var ruleName = rule [1]; - section += $"

{ruleID}: {ruleName}

\n\n"; + section += $"### {ruleID}: {ruleName}\n\n"; foreach (var xpaResult in target.Descendants (ns + "XamarinProjectAnalysisResult").Elements ()) { if (xpaResult.Name.LocalName != "Category") { - section += "* **" + xpaResult.Name.LocalName + ":** "; + section += "- **" + xpaResult.Name.LocalName + ":** "; section += xpaResult.Value + "\n"; } } diff --git a/docs/website/xamarin-ios-analysis.md b/docs/website/xamarin-ios-analysis.md index ed2fde5c90..d1aa4bd881 100644 --- a/docs/website/xamarin-ios-analysis.md +++ b/docs/website/xamarin-ios-analysis.md @@ -1,33 +1,35 @@ -id:{c29b69f5-08e4-4dcc-831e-7fd692ab0886} -title:Xamarin.iOS Analysis Rules +--- +id: C29B69F5-08E4-4DCC-831E-7FD692AB0886 +title: "Xamarin.iOS Analysis Rules" +dateupdated: 2017-06-26 +--- [//]: # (The original file resides under https://github.com/xamarin/xamarin-macios/tree/master/docs/website/) [//]: # (This allows all contributors (including external) to submit, using a PR, updates to the documentation that match the tools changes) [//]: # (Modifications outside of xamarin-macios/master will be lost on future updates) -

XIA0001: DisabledLinkerRule

+### XIA0001: DisabledLinkerRule -* **Problem:** The linker is disabled on device for the debug mode. -* **Fix:** You should try to run your code with the linker to avoid any surprises. +- **Problem:** The linker is disabled on device for the debug mode. +- **Fix:** You should try to run your code with the linker to avoid any surprises. To set it up, go to Project > iOS Build > Linker Behavior. -

XIA0002: TestCloudAgentReleaseRule

+### XIA0002: TestCloudAgentReleaseRule -* **Problem:** App builds that initialize the Test Cloud agent will be rejected by Apple when submitted, as they use private API. -* **Fix:** Add or fix the necessary #if and defines in code. +- **Problem:** App builds that initialize the Test Cloud agent will be rejected by Apple when submitted, as they use private API. +- **Fix:** Add or fix the necessary #if and defines in code. -

XIA0003: IPADebugBuildsRule

+### XIA0003: IPADebugBuildsRule -* **Problem:** Debug configuration that uses developer signing keys should not generate an IPA as it is only needed for distribution, which now uses the Publishing Wizard. -* **Fix:** Disable IPA build in Project Options for the Debug configuration. +- **Problem:** Debug configuration that uses developer signing keys should not generate an IPA as it is only needed for distribution, which now uses the Publishing Wizard. +- **Fix:** Disable IPA build in Project Options for the Debug configuration. -

XIA0004: Missing64BitSupportRule

+### XIA0004: Missing64BitSupportRule -* **Problem:** The supported architecture for "release | device" isn't 64 bit compatible, missing ARM64. This is a problem as Apple does not accept 32 bits only iOS apps in the AppStore. -* **Fix:** Double click on your iOS project, go to Build > iOS Build and change the supported architectures so it has ARM64. +- **Problem:** The supported architecture for "release | device" isn't 64 bit compatible, missing ARM64. This is a problem as Apple does not accept 32 bits only iOS apps in the AppStore. +- **Fix:** Double click on your iOS project, go to Build > iOS Build and change the supported architectures so it has ARM64. -

XIA0005: Float32Rule

- -* **Problem:** Not using the float32 option (--aot-options=-O=float32) leads to hefty performance cost, specially on mobile, where double precision math is measurably slower. Note that .NET uses double precision internally, even for float, so enabling this option affects precision and, possibly, compatibility. -* **Fix:** Double click on your iOS project, go to Build > iOS Build and uncheck the "Perform all 32-bit float operations as 64-bit float". +### XIA0005: Float32Rule +- **Problem:** Not using the float32 option (--aot-options=-O=float32) leads to hefty performance cost, specially on mobile, where double precision math is measurably slower. Note that .NET uses double precision internally, even for float, so enabling this option affects precision and, possibly, compatibility. +- **Fix:** Double click on your iOS project, go to Build > iOS Build and uncheck the "Perform all 32-bit float operations as 64-bit float".