Bug 24351 - Build > Clean does not clear /obj/Xcode folder
Summary: Build > Clean does not clear /obj/Xcode folder
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Jeffrey Stedfast
URL:
Depends on:
Blocks:
 
Reported: 2014-11-07 15:09 UTC by David Hathaway
Modified: 2014-11-07 16:42 UTC (History)
3 users (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 NOT_ON_ROADMAP

Description David Hathaway 2014-11-07 15:09:17 UTC
When editing .Xib files from an iOS app, Xamarin creates a folder called /obj/Xcode, with a series of sequentially indexed folders (i.e. 0, 1, 2, etc.).  

/obj/Xcode
/obj/Xcode/0
/obj/Xcode/1

Each time you open up a .xib file from Xamarin Studio, it creates a new indexed folder, even if the .Xib has already been edited once in Xcode.  This folder grows out of control, and doesn't get cleaned up when you select Build > Clean.  The only way to clean it up is to manually delete the folder in Finder.

This is exacerbated by the fact that every time you click back to Xamarin Studio, we close Xcode, which means that you can "switch" between your view and your controller logic w/o paying this penalty (plus, the added time of waiting for Xcode to reload).

Steps to reproduce

1. Open up new Xamarin.iOS "Empty" project
2. Add a single .Xib View
3. Double click the .xib file to open in in Xcode
4. Cmd+Tab to switch back to Xamarin Studio
5. Note Xcode closes, and that the {$ProjectDir}/obj/Xcode subdirectories has incremented by 1
6. Repeatedly open up the same .Xib file, and switch context back to XS, and you'll see the number of folders in /obj/Xcode increase forever

For large projects, this can take up gigs of your hard drive in a single day.

Version Information:

=== Xamarin Studio ===

Version 5.5.3 (build 6)
Installation UUID: e16d0ece-7353-4886-83b5-86d62e1d480c
Runtime:
	Mono 3.10.0 ((detached/e204655)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000023

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.Mac ===

Version: 1.10.0.18 (Enterprise Edition)

=== Xamarin.iOS ===

Version: 8.4.0.16 (Enterprise Edition)
Hash: 80e9ff7
Branch: 
Build date: 2014-10-22 15:09:12-0400

=== Xamarin.Android ===

Version: 4.18.1 (Enterprise Edition)
Android SDK: /Users/davidhathaway/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

=== Build Information ===

Release ID: 505030006
Git revision: fbe3e9453daf6a3bb9a9709ed22bec35f7c9056b
Build date: 2014-10-23 13:08:38-04
Xamarin addins: e44add2b39de4dd57c0742bb2e620dfad84c64c6

=== Operating System ===

Mac OS X 10.10.0
Darwin dwhathamacbook2 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 1 David Hathaway 2014-11-07 15:49:28 UTC
Confirmed that Xamarin Studio 5.6.2 fixes the context switching issue, so you can keep Xcode open and switch back to XS to edit your controller.  However, the root problem of the /obj/Xcode folder growing, and not getting cleaned up still exists.

Current workaround is to periodically delete the Xcode folder.  This is no problem, as long as you're not currently editing a .Xib file.
Comment 2 Jeffrey Stedfast 2014-11-07 16:37:10 UTC
Close Xcode before switching back to XS and it will clean everything up, otherwise we can't do it because Xcode will blow up in our face.
Comment 3 Jeffrey Stedfast 2014-11-07 16:42:20 UTC
I've modified the code to delete obj/Xcode when you first launch Xcode via double-clicking a xib/storyboard