Reputation: 22956
I downloaded the Red Laser MonoTouch sample and ran the project in MonoDevelop, I had to first update the solution file so that it would load up in MonoDevelop.
When I try to view one of the .xib files in the Xcode Interface builder I get the error:
Error updating Xcode project. Could not generate outlet 'overlayController' in class 'RedLaserSample.RLSampleViewController' as its type 'RedLaserSample.OverlayController' could not be resolved to Obj-C.
Details:
MonoDevelop.MacDev.ObjCIntegration.ObjectiveCGenerationException: Could not generate outlet 'overlayController' in class 'RedLaserSample.RLSampleViewController' as its type 'RedLaserSample.OverlayController' could not be resolved to Obj-C at MonoDevelop.MacDev.ObjCIntegration.NSObjectTypeInfo.GenerateObjcType (System.String directory) [0x001bf] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectTypeInfo.cs:116 at MonoDevelop.MacDev.XcodeSyncing.XcodeSyncedType.SyncOut (MonoDevelop.MacDev.XcodeSyncing.XcodeSyncContext context) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeSyncedType.cs:62 at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x00318] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:138 at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:315
Upvotes: 0
Views: 632
Reputation: 144
If your OverlayController file is under a different project folder than the RLSampleViewController, which holds a reference to the OverlayController. Make sure that RLSampleViewController and OverlayController are in the same level or under same project folder. We have resolved the same issue by just simply moving the files directly under the project not a project folder.
Please also refer to Registration and Namespaces in the Xamarin XIB Code Generation Documentation Page
Upvotes: 2
Reputation: 19345
You need to add [Register ("OverlayController")] to your OverlayController class.
Upvotes: 2