Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the touch/untouch do in xcode?

Tags:

xcode

iphone

In XCode, if one right-clicks on a class file or a .xib file, there are two menu items: "Touch" and "Untouch".

What do they do?

like image 595
Rahul Vyas Avatar asked Dec 02 '09 12:12

Rahul Vyas


1 Answers

If a file is touched, it will be rebuilt the next time you build a target to which it belongs.

Thus, touch marks a file as being modified (and thus needing to be compiled) - easier than opening the file, adding a space, deleting the space, and then saving it.

Untouch does the opposite - marks the file as not needed to be compiled (usually a bad thing to do since the build can get out of sync with the sources, but if all you did was edit the date in a comment in a header file included by everything it allows you to avoid a full rebuild).

like image 98
luvieere Avatar answered Oct 13 '22 03:10

luvieere