Bug 1138 - XML codes are displayed on the Xcode Editor area.
Summary: XML codes are displayed on the Xcode Editor area.
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: Trunk
Hardware: Macintosh Mac OS
: Highest major
Target Milestone: ---
Assignee: Alan McGovern
: 1238 ()
Depends on:
Reported: 2011-09-29 12:07 UTC by Nischal
Modified: 2011-12-22 04:34 UTC (History)
4 users (show)

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

Image for the bug (210.42 KB, image/jpeg)
2011-09-29 12:07 UTC, Nischal

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:

Description Nischal 2011-09-29 12:07:20 UTC
Created attachment 534 [details]
Image for the bug

Steps to reproduce:
1. Launch the MonoDevelop.
2. Create an iPhone Story board utility application.
3. Now double click on .storyboard file or Right click on .storyboard file and select Xcode Interface Builder.
4. See XML codes are displayed on the editor area of Xcode.

Actual result:
XML codes are displayed on the editor area.Refer the attached screenshot.

Expected result:
Main View Controller and Flipside View Controller should be displayed on the editor area.

OS: Snow Leopard 
VM: Lion 10.7
MonoTouch 4.9.4
MonoDevelop 2.8 Beta3
MonoFramework 2.10.5
Comment 1 Alan McGovern 2011-10-03 06:19:23 UTC
Can you re-test with the provisional packages for 2.8 final? I think this issue has been fixed. I can't reproduce it myself.
Comment 2 Alan McGovern 2011-10-05 05:33:17 UTC
*** Bug 1238 has been marked as a duplicate of this bug. ***
Comment 3 Alan McGovern 2011-10-05 05:40:09 UTC
You need to install the iOS 5 SDK for this to work. The screenshot shows that you are targetting the iOS 4.3 sdk which probably means you don't have the correct version of Xcode either. You need the latest beta for Xcode 4.2 as well as the latest beta for iOS 5.0.
Comment 4 Alan McGovern 2011-10-05 05:40:27 UTC
Comment 5 Mikayla Hutchinson [MSFT] 2011-10-05 08:04:41 UTC
We could guard against this in MD and show an error message, since we check the Xcode version.
Comment 6 Mikayla Hutchinson [MSFT] 2011-10-05 08:39:05 UTC
Reopening as I really think we could handle this better.
Comment 7 Jatin 2011-10-10 10:42:29 UTC
I have validated this issue on MonoTouch 4.9.8 with Xcode 4.2 installed and iOS 5 SDK, and now it is working fine.

Please suggest the further course of action, as the issue is still in Reopened state.
Comment 8 Alan McGovern 2011-10-25 10:50:25 UTC
There are two things options I can think of:

1) As MonoDevelop requires xcode 4.2 or higher we can pop up a dialog after the project has loaded and warn the user that Xcode 4.2 or higher is required and that some things may not work if they don't have it. This would still allow them to work.

2) We could prevent MonoTouch/MonoMac projects from being opened/created unless Xcode >= 4.2 is detected

3) We could only show the popup when they try to open a xib or storyboard file

However I did recently update a number of .xib and .storyboard template files using xcode 4.2, so I would hope that xcode < 4.2 would refuse to open them now making extra checking redundant.
Comment 9 Alan McGovern 2011-11-28 09:16:44 UTC
I implemented the change to display an error message if the user tries to open a storyboard/xib without installing xcode.
Comment 10 Alan McGovern 2011-12-06 09:43:02 UTC
There's an issue with the approach I took - it prevents people from developing MonoMac applications with older versions of Xcode on older versions of MacOS. With that in mind, do we want to make Xcode 4.2 a hard dependency of MonoDevelop for any kind of iOS/MacOS development?

If the answer to that is no, we could try parsing the version out of the .xib/.storyboard files and show the error only if you try to load a new xib with an old Xcode. This would allow people to use the IB3 based MonoMac templates with old versions of Xcode while still allowing us to require Xcode 4 for iOS apps which have Xcode 4 generated xib/storyboard files.

This also raises an interesting question about when/if we should update MonoMac xib files by regenerating them from Xcode 4.
Comment 11 Alan McGovern 2011-12-06 11:39:12 UTC
I just discussed this internally and our position is:

Apple does not support Leopard any more so neither do we. As Xcode 4.2 can be installed on both Lion and Snow Leopard we will keep the hard dependency on it as it is the only version of Xcode that is actively tested and maintained. For older versions of MacOS the solution is to use older versions of MonoDevelop which still support 10.5 and Xcode < 4.2
Comment 12 Jatin 2011-12-22 04:33:19 UTC
This is working fine. Hence, closing this issue.