PDA

View Full Version : Xcode cannot see file




pinsrw
Nov 11, 2010, 08:18 AM
Hi all,

I wanted to add my icon files to my project, but I discovered that Xcode cannot see them or rather it does not show them in the Add Files dialog window. So I "ls -l"'d them and noticed there were extended attributes i.e. "@".

Here is the extended attribute:
com.apple.quarantine 15

These are files that I had copied over from my flash drive. Is it the case that Apple considers files from a flash drive suspicious or something, hence the label "quarantine" and the fact that Xcode could not see them?

Thanks.



gnasher729
Nov 11, 2010, 09:27 AM
Double click the file in the Finder, see what happens. That might fix your problem.

pinsrw
Nov 11, 2010, 11:44 AM
Double click the file in the Finder, see what happens. That might fix your problem.

The files in question are my icons. They all appear just fine in the Finder.

What's odd is that I found I can drag and drop them into Xcode.

The problem is merely that when I use the Add to Project pulldown that the dialog window doesn't show them, which is counter-intuitive.

chown33
Nov 11, 2010, 11:46 AM
Use ls -l@ to examine the xattrs of the original files on the flash drive.

Identify your OS version. I don't see any quarantine attributes when I copy from a flash drive here.

Run this command and read its output:
xattr -h

Then formulate an 'xattr' command line to remove the attributes you don't want.

gnasher729
Nov 11, 2010, 11:56 AM
The files in question are my icons. They all appear just fine in the Finder.

What's odd is that I found I can drag and drop them into Xcode.

The problem is merely that when I use the Add to Project pulldown that the dialog window doesn't show them, which is counter-intuitive.

Did you double click the files? Did you think to yourself "maybe gnasher has some reason to ask me to double click the files"?

pinsrw
Nov 11, 2010, 04:56 PM
Did you double click the files? Did you think to yourself "maybe gnasher has some reason to ask me to double click the files"?

Don't gnash your teeth over this: I did double click them and they're OK.

pinsrw
Nov 11, 2010, 04:58 PM
Use ls -l@ to examine the xattrs of the original files on the flash drive. Identify your OS version.

Snow Leopard. It's all fixed now. I just did this:
for s in *.png; do cat $s > foo; mv foo $s; done

That removed all the "com.apple.quarantine" attributes.