Bug 12283 - Cannot register two managed types ('Test.UIApplication' and 'MonoTouch.UIKit.UIApplication')
Summary: Cannot register two managed types ('Test.UIApplication' and 'MonoTouch.UIKit....
Status: RESOLVED FEATURE
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: 6.3.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-05-17 10:51 UTC by mono.developer.kr
Modified: 2013-05-17 14:42 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
vs2012 project. (259.42 KB, application/zip)
2013-05-17 10:51 UTC, mono.developer.kr
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FEATURE

Description mono.developer.kr 2013-05-17 10:51:00 UTC
If it has used same namespace as native ios. Xamarin.ios beta did appear an error below. This report has attached an example file.

Cannot register two managed types ('Test.Native.UIApplication' and 'MonoTouch.UIKit.UIApplication') with the same native name ('UIApplication').
  at MonoTouch.Registrar.Registrar.RegisterType (System.Type type, System.Collections.Generic.List`1 exceptions) [0x000ca] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Registrar.cs:569 
  at MonoTouch.Registrar.Registrar.RegisterAssembly (System.Reflection.Assembly assembly) [0x0005b] in /Developer/MonoTouch/Source/monotouch/src/ObjCRuntime/Registrar.cs:776
Comment 1 mono.developer.kr 2013-05-17 10:51:42 UTC
Created attachment 3985 [details]
vs2012 project.
Comment 2 Sebastien Pouliot 2013-05-17 14:42:59 UTC
That's normal, only one `UIApplication` can be registered *correctly* with ObjC. 

IOW if ObjC needs to calls UIApplication then it can only end up calling one managed type. If two are registred which one will it be ?

Earlier versions did not check for duplicates and that created weird random errors (depending on which one registered first). Newer versions will report an error.