Bug 23652 - Unable to use customer XIB in library
Summary: Unable to use customer XIB in library
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.11.0
Hardware: PC Mac OS
: Normal normal
Target Milestone: 2.0.x
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2014-10-06 13:15 UTC by Cody Beyer (MSFT)
Modified: 2015-03-02 05:09 UTC (History)
7 users (show)

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


Attachments
TestCase (5.47 MB, application/zip)
2014-10-06 13:15 UTC, Cody Beyer (MSFT)
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:
VERIFIED FIXED

Description Cody Beyer (MSFT) 2014-10-06 13:15:46 UTC
Created attachment 8318 [details]
TestCase

Referencing an XIB in a library causes the following error to be thrown at runtime:

2014-10-03 12:00:21.293 uicontrolinlibrary[60102:2807] Unknown Window class windowinlibrary in Interface Builder file,
creating generic Window instead


Please see example project attached: TestCase


=== Xamarin Studio ===

Version 5.4 (build 240)
Installation UUID: 405ce01e-840a-449b-81a9-8c154a268953
Runtime:
Mono 3.8.0 ((no/db71bc1)
GTK+ 2.24.23 (Raleigh theme)

Package version: 308000013

=== Apple Developer Tools ===

Xcode 6.0 (6299)
Build 6A313

=== Xamarin.iOS ===

Version: 8.0.0.63 (Business Edition)
Hash: 58b46df
Branch:
Build date: 2014-09-18 22:32:07-0400

=== Xamarin.Android ===

Not Installed

=== Xamarin.Mac ===

Version: 1.10.0.13 (Business Edition)

=== Build Information ===

Release ID: 504000240
Git revision: 01786bc67c7024ec33d327ed27e4416d7a846f4e
Build date: 2014-09-17 10:58:48-04
Xamarin addins: 7cd7dfcd6b7b7b53281508954ec080f1cd153ad3

=== Operating System ===

Mac OS X 10.9.5
Darwin Engineering-MacBook-Air.local 13.4.0 Darwin Kernel Version 13.4.0
Sun Aug 17 19:50:11 PDT 2014
root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64

Thanks!
Comment 1 Ram Chandra 2014-10-06 14:11:12 UTC
I have checked this issue with attached sample and I am able to reproduce this issue.

When I build and deploy the application I observed that when I click on "Load Window in Control Library" I observed that the following error message is thrown on application output window. 

"uicontrolinlibrary[3787:2507] Unknown Window class windowinlibrary in Interface Builder file,
	 creating generic Window instead"

Screencast: http://www.screencast.com/t/6c1KPAn0
Build Output: https://gist.github.com/saurabh360/f9f0406b8455300d75c2
IDE logs: https://gist.github.com/saurabh360/a67eed471be44fc1e1d1

Environment Info


=== Xamarin Studio ===

Version 5.5 (build 227)
Installation UUID: 6ea47b0d-1852-4aaf-808d-373ff0a5002b
Runtime:
	Mono 3.10.0 ((detached/633e444)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000020

=== Apple Developer Tools ===

Xcode 6.0.1 (6528)
Build 6A317

=== Xamarin.Mac ===

Version: 1.10.0.18 (Business Edition)

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: /Users/jatin66/Desktop/Backup/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.0   (API level 11)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin.iOS ===

Version: 8.2.0.196 (Business Edition)
Hash: c6bcfc8
Branch: 
Build date: 2014-10-05 21:42:57-0400

=== Build Information ===

Release ID: 505000227
Git revision: 7b721eeec7a2fa4c4f4de0ecd2aed4dc25edac95
Build date: 2014-10-02 15:53:38-04
Xamarin addins: 99ed56b428b31eba1efaace4d82188d6f334e6ca

=== Operating System ===

Mac OS X 10.9.5
Comment 2 Chris Hamons 2014-12-19 18:58:30 UTC
Hey everyone,

So this is caused by a flaw in our registration logic. I'm looking at fixing it, but until then, I have a work around.

If before you call NSApplication.Init you force the assembly with nib files to load, say:

var x = typeof(MyLib.MyClass);

it should register your types correctly and things should work (tested Alpha channel).
Comment 3 Chris Hamons 2014-12-19 19:07:30 UTC
This is also fixed by the new registrar that is available in the alpha channel:

--registrar:static
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-01-08 14:05:51 UTC
Fixed.

maccore/master: 375d47e987e840e2dbbdbf64da52d6355ae6581f
xamcore/master: 89fd31687c9e306cbe7bc261c63df14fe574df5