开发者

Error when attempting to open .xib in XCodeInterfaceBuilder

开发者 https://www.devze.com 2023-04-09 14:22 出处:网络
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.

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


You need to add [Register ("OverlayController")] to your OverlayController class.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消