Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you prevent Xcode 4 from ignoring .a files in your SVN repository?

Tags:

svn

xcode4

I have an Xcode 4 project that uses the Google Analytics SDK. The SDK includes two libraries with the standard .a extension. Xcode 4's built in SVN system is set to automatically ignore .a files which is a problem for me (I need them in the repository and can't ask everyone that uses the repository to install the files manually).

So can you prevent Xcode from ignoring .a files? (I've tried right clicking the file -> Source Control -> Undo Ignore but absolutely nothing happens as a result).

like image 928
Mattia Avatar asked Aug 11 '11 18:08

Mattia


1 Answers

It depends on how XCode is currently ignoring the file. Generally I find that it is ignoring it by choice, e.g. it has never even added it to version control and will not give you the option to add it. In which case you can open up a Terminal, navigate to your projects directory and execute something like:

svn add pathto/file/name

e.g.

svn add Project/AddedLibraries/libsdl.a

XCode should then happily version control this, if you switch back to XCode and look it should be flagged with an 'A' to add.

If XCode is really ignoring the file, e.g. it was in version control but changes are no longer commited, then you need to:

svn propdel svn:ignore pathto/file/name

This will simply return an error if the property is not set. You could also execute:

svn propdel svn:ignore -R

to remove the ignore flag lock stock.

There is one other possibility. Subversion is configured centrally under the miscellany section to ignore that file. Look in ~/.subversion/config. A section could look something like this:

[miscellany]

global-ignores = .*~ *~ .#* .DS_Store *.pbxuser *.xcuserdatad xcuserdata *.mp3

Should you get a warning from svn about lacking an editor the following should help:

By default it should look for the unix environment variable "VISUAL", failing that it will look for "EDITOR". Personally I'm a vim guy, but you may prefer nano or emacs. Either way set the environment variable appropriately in your shell. This will set it for your current shell session only:

export VISUAL=/usr/bin/vim

To set it more permanently, do it to your .bash_profile in your home directory:

VISUAL="/usr/bin/vim"
export VISUAL

you will need to close and reopen your terminal window if you do the latter. If you're unsure of the path to the command you want use which, e.g. which nano.

like image 127
Diziet Avatar answered Oct 19 '22 13:10

Diziet