Bug 5439 - Various Xcode files disappear - AppDelegate.m, etc.
Summary: Various Xcode files disappear - AppDelegate.m, etc.
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2012-05-31 12:35 UTC by Franklynw
Modified: 2012-06-15 14:50 UTC (History)
1 user (show)

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

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:
Status:
RESOLVED FIXED

Description Franklynw 2012-05-31 12:35:49 UTC
Been having this problem continuously with version 3 of MonoDevelop. I'll add a new iPhone ViewController which gives me a .cs, a designer.cs & a .xib - so far so good. Sometimes when I double-click the .xib & go to Xcode, it's all fine & the .m & .h files are there & let me add outlets & actions. Invariably though, if I add another ViewController, and double-click the .xib, when I get to Xcode the new .m file is missing (it's in red) and so is the AppDelegate.m. On further investigation of the actual Xcode files in the Finder, I find a new folder for each change, and when I open these folders I find the required AppDelegate.m and the new ViewController's .m - if I drag them into the newest build folder, the files are found by Xcode. However, it gets weirder, the xib's class claims to be the right one, but when you click on the list of available classes, the right one isn't there, which means you get an error if you attempt to make an outlet or an action. This can be solved by adding a new VC in Xcode (use any name), which somehow makes it register the existing ones, then you can begin to add outlets & actions. Obviously, this is far from ideal and causes a tremendous waste of time throughout the day. I'm wondering if it's new with version 3, as we've only been experiencing it this week. Many thanks for taking this on board!
Comment 1 Jeffrey Stedfast 2012-05-31 14:38:23 UTC
Strange...

Like you've noticed, we *do* generate a new output directory every time you change something in MonoDevelop, but we also tell Xcode to close the old project and open the freshly generated one.

(Note: we can't re-use the same directory because Xcode blows up if we rewrite the project.pbxproj out from under it).

What version of Xcode are you using?

The only thing I can think of is that I added some applescript timeouts between 2.8 and 3.0 (those are the only changes I made) and maybe the close/open applescript calls are timing out? They are set to 30 seconds, though. Is this happening on a large project? Or is your machine "slow"? I don't know how to quantify "slow", but I guess if you are on a mac-mini or something, that could explain it.
Comment 2 Jeffrey Stedfast 2012-05-31 17:08:35 UTC
I've bumped up the timeouts to 60 seconds instead of 30

http://files.xamarin.com/~jeff/MonoDevelop-3.1.0.dmg
Comment 3 Jeffrey Stedfast 2012-06-13 16:13:46 UTC
this should be fixed in the 3.0.3.1 beta
Comment 4 Jeffrey Stedfast 2012-06-15 14:50:23 UTC
Found the actual bug regarding the missing AppDelegate.m, the migration code from 1 location to another was broken.

Fix didn't make it into 3.0.3.1 (obviously, since it's been out a week or so) but I'm going to backport the fix to the 3.0.3 branch so that the next beta build will have it.