Solved: Old Xcode default "Build" Directory & Time Machine
Solved: Old Xcode default "Build" Directory & Time Machine
- Subject: Solved: Old Xcode default "Build" Directory & Time Machine
- From: Jerry Krinock <email@hidden>
- Date: Mon, 24 Feb 2014 20:27:53 -0800
Thank you, Kyle. I think I have it under control now.
On 2014 Feb 24, at 18:25, Kyle Sluder <email@hidden> wrote:
> Xcode still has this preference: it lives on the Locations tab.
OK, but none of the paths in there are the directory that Time Machine was ignoring. In particular, Derived Data > Advanced Settings is set to “Unique”, and “Products” are “(Project or Workspace Derived Data Folder)/Build/Products”.
In other words, I’m using the new Xcode defaults, and not my old Builds directory.
> If you want, you can try removing the “don’t backup” xattr from the build directory,
Good idea. It looks like there may be two such attrs now…
Air2:Programming jk$ cd /Users/jk/Documents/Programming/
Air2:Programming jk$ xattr -l Builds
com.apple.XcodeGenerated: Yes
com.apple.metadata:com_apple_backup_excludeItem:
00000000 62 70 6C 69 73 74 30 30 5F 10 11 63 6F 6D 2E 61 |bplist00_..com.a|
00000010 70 70 6C 65 2E 62 61 63 6B 75 70 64 08 00 00 00 |pple.backupd....|
00000020 00 00 00 01 01 00 00 00 00 00 00 00 01 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 1C |.............|
0000003d
Air2:Programming jk$ xattr -d com.apple.XcodeGenerated Builds
Air2:Programming jk$ xattr -d com.apple.metadata:com_apple_backup_excludeItem Builds
Air2:Programming jk$ xattr -l Builds
Air2:Programming jk$
and after that, a Time Machine backup copied that Builds directory. Success.
> but if you ever nuke and rebuild it the setting will be back and you’ll silently lose backups. I recommend adding a build phase that copies your archives out to a directory entirely under your control.
Yes, and that’s what I thought I had! When I installed Xcode 4, I let it use all of its new default Locations, thinking that my old “Builds” folder would be *my* Builds folder now. But apparently the upgrade did not clean up Xcode's old xattrs.
Since I half know what I’m doing now, I decided to delete the preference I mentioned in my original post, which I think is being ignored, that is still set to *my* build folder. This is so that Xcode does not decide to reach out and xattr it again at some point in the future, as you suggested it might.
jk$ defaults delete com.apple.dt.Xcode IDEApplicationwideBuildSettings
Then I launched Xcode. The settings Preferences > Locations are unchanged. Good. I then built a couple targets from different projects and these succeeded. Then I quit Xcode and verified that the IDEApplicationwideBuildSettings had not returned.
jk$ defaults read com.apple.dt.Xcode IDEApplicationwideBuildSettings
2014-02-24 20:10:17.395 defaults[75095:507]
The domain/default pair of (/Users/jk/Library/Preferences/com.apple.dt.Xcode, IDEApplicationwideBuildSettings) does not exist
Conclusion: I think the problem is solved. Kyle, thank you for the tip on the xattrs.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden