Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 470 [details]
Image for the bug
Steps to reproduce:
1. Launch the MonoDevelop.
2. Create a solution of MonoTouch Single View application.
3. Double click on .xib file and add few buttons and label.
4. Add outlets and Actions.
5. Modify AppDelegate.cs file accordingly.
6. Run the application.
7. See application is running successfully.
8. Now open Info.plist.
9. Select <projectname>ViewController as Main Interface from the drop down list.
10. Now RUN the application.
11. See exception occurred.
Fatal exception is occurred when user selects <projectname>ViewController as Main Interface and then run the script. Refer the attached screenshot.
Fatal exception should not be occurred when user selects <projectname>ViewController as Main Interface and then run the script. Refer the attached screenshot.
VM: Parallel Desktop
OS: Lion 10.7 (Guest Operating System)
MonoDevelop 2.8 beta 2
Mono Framework for MAC OS X Intel Runtime
Mike, how are we populating the list of valid classes for the "Main Interface" UI?
I suspect that this is not really a bug, but a user error.
The Main Interface combo doesn't show classes, it shows all xib and storyboard files. If a Main Interface is specified, it will be loaded by UIApplicationMain. The File's Owner will be the NSApplication instance. A xib file used as a main Interface is expected to contain an app delegate object (an object with a custom class that adopts the NSApplicationDelegate protocol) that's connected to the File's owner delegate outlet.
We could filter the list to show only classes that are valid as main interface files, but it would be very expensive for very little gain. We'd have to inspect all xib files in the projects for objects that connect to a delegate outlet on File's Owner, resolve those objects' custom classes, and check whether they're valid app delegates.
Note that the default xib templates are designed not to use a Main Interface file. Instead they pass the app delegate class name to UIApplication.Main.
*** Bug 6847 has been marked as a duplicate of this bug. ***
closing as user error