MonoMac: and Xcode 4.0 error: "Unknown Window class MainWindow in Interface Builder file" - interface-builder

I've created a new MonoMac project and opened the MainWindow.xib with Interface Builder (Xcode). After doing a simple change (renamed Window title), the project can't be built anymore.
Does anyone know how to fix this?
I'm using MonoDevelop 2.6, MonoFramework-2.10.1 with Xcode 4.0 on OS X 10.6.7.
This is the error message:
2011-03-28 18:45:39.986 HelloWorld[30332:613] Unknown Window class MainWindow in Interface Builder file,
creating generic Window instead
Unhandled Exception: System.InvalidCastException: Cannot cast from source type to destination type.
at HelloWorld.MainWindowController.get_Window () <0x0002e>
at HelloWorld.AppDelegate.FinishedLaunching (MonoMac.Foundation.NSObject) <0x0003d>
at (wrapper dynamic-method) object.[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) <0x00033>
at (wrapper native-to-managed) object.[HelloWorld.AppDelegate.Void FinishedLaunching(MonoMac.Foundation.NSObject)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.Foundation.NSObject) <0x000eb>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00003>
at MonoMac.AppKit.NSApplication.Main (string[]) <0x00017>
at HelloWorld.MainClass.Main (string[]) <0x00019>
Thanks for any help.
Cheers
PS: I found a troubleshooting help on http://monotouch.net/Documentation/Troubleshoot#Unknown_class_XXXX_in_Interface_Builder_filebut I guess it doesn't count in this case, since the class MainWindow already exists by default..

I think I've found the answer:
http://go-mono.com/forums/#nabble-td3390853
Xcode 4.0 is not really supported right now.. but I hope someone else corrects me :-)

This post contains the explanation about the incomplete support of Xcode 4.0. It is recommended to use Xcode 3.2.6 until Xcode 4.0 is supported.

Related

il2cpp file not available

I developed an iOS game in Unity editor which is also playable in Unity editor and I did Build&Run the game in iOS (Xcode). The build is succeed but the game does not work properly. That is why I decided to debug my function and then I got the following errors in Xcode (NOT IN UNITY):
NullReferenceException: A null value
was found where an object instance was
required. at
BallScript.MobileControl () [0x00000]
in :0
(Filename:
currently not available on il2cpp
Line: -1)
What is the reason to cause those errors and what can I do against them?
This means the code in the MobileControl method in the BallScript class is trying to use a null value somewhere. I'd recommend debugging the code to better understand what is happening. You need to be using Unity 2018.2 or later to debug C# code on iOS. You can see directions about how to do that here: https://docs.unity3d.com/Manual/ManagedCodeDebugging.html
Note that the (Filename: currently not available on il2cpp Line: -1) is benign. It is unrelated to the specific error in this case, and you can ignore it.

Qt creator (mac) crashes while opening .ui file

When I try to open a .ui form in Qt Creator, it crashes.
Here's some strings from a crash report:
Application Specific Information:
terminating with uncaught exception of type std::bad_alloc:
std::bad_alloc abort() called
Does anyone know what to do? If so, help me out, please.
OK, here's the solution:
I have reinstalled the OS and Qt with all its parts works properly.
If someone has the same problem and has a Time Machine archive, do not restore from it, 'cause if you do, the bug will remain. Instead of that, install OS X and then restore files from Finder, if necessary.

Adding a viewcontroller to xcode causes exceptions in monodevelop

I just started out on Monodevelop 3.1.1. I opened the .xib file. I did a hello world program. Works fine. Now i created new monodevelop project and in that i am trying to use the popover style of iPad (i.e. if one clicks a button and we have a popover style for drop down).I added a viewcontroller to Xcode and I got this error.
System.ArgumentNullException: Argument cannot be null.
Parameter name: path1
at System.IO.Path.Combine (System.String path1, System.String path2) [0x000c6] in /private/tmp/monobuild/build/BUILD/mono-2.10.9/mcs/class/corlib/System.IO/Path.cs:126
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.ScanForAddedFiles (IProgressMonitor monitor, MonoDevelop.MacDev.XcodeSyncing.XcodeSyncBackContext ctx, System.Collections.Generic.HashSet`1 knownFiles, System.String directory, System.String relativePath) [0x00067] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:214
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.GetChanges (IProgressMonitor monitor, MonoDevelop.MacDev.ObjCIntegration.NSObjectInfoService infoService, MonoDevelop.Projects.DotNetProject project) [0x00070] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:256
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.SyncXcodeChanges (IProgressMonitor monitor) [0x00017] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-3.1-series/5d928ec4/source/md-addins/MonoDevelop.MacDev/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:497
So where do we add a viewcontroller if we need to add one in MonoDevelop/Xcode?And how do we do it?More questions coming. If you need more info please ask.Thanks. Any help would be appreciated.
This looks like a bug in MonoDevelop. You should be able to add view controllers in Xcode and it should get imported back into MonoDevelop.
I'll look into fixing this bug if it still exists in Xamarin Studio (aka MonoDevelop 4.0).
Update: This should be fixed in 4.0.1

'Could not instantiate class named NSLayoutConstraint' while auto layout is disabled

My application is crashing on iOS 5 when I call presentModalViewController on a new view with the error:
Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'
I know that this error should be fixed by unchecking auto layout, but it isn't. I unchecked it in all my nibs.
The very puzzling part is that using a view I created one month ago, there is no crash, but using one that I created today, it crashes.
Is there another setting that I should know about?
I'm using XCode 4.5.2, with SDK 6.0, and deployment target 5.0.
I guess you would have solved the problem by now.
But for others who would stumble into this post, please check this post: https://stackoverflow.com/a/13201690/942966

Trying to open a storyboard from monotouch is giving me an error

I have created a masterdetail storyboard application within monotouch. When I try double clicking on the storyboard to open it up in xcode I get an error
Error updating Xcode project`. Could not generate outlet 'DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C.
MonoDevelop.MacDev.ObjCIntegration.ObjectiveCGenerationException: Could not generate outlet' DetailItem' in class 'LCMasterDetail.DetailViewController' as its type 'System.String' could not be resolved to Obj-C
at MonoDevelop.MacDev.ObjCIntegration.NSObjectTypeInfo.GenerateObjcType (System.String directory, System.String[] frameworks) [0x001e8] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/ObjCIntegration/NSObjectTypeInfo.cs:159
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:64
at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x00324] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeMonitor.cs:137
at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00000] in /private/tmp/source/monodevelop/main/src/addins/MonoDevelop.MacDev/XcodeSyncing/XcodeProjectTracker.cs:315
Been a newbie noob to monotouch I have no clue whats wrong.
Anyone else had this problem?
What version of MonoDevelop are you using? This works just fine with MonoDevelop 2.8.5, the latest stable release. If you're using the 2.9.x beta series, would be able able to try with 2.8.5? Also, what version of Mono do you have installed?
The above information can be found by clicking on 'MonoDevelop -> About -> Version Information'.
EDIT: This is a regression in the 2.9.x beta series, so if you just switch to the stable version everything will work as expected.

Resources