Xcode cannot see file

Discussion in 'Mac Programming' started by pinsrw, Nov 11, 2010.

  1. macrumors regular

    Joined:
    May 30, 2010
    #1
    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.
     
  2. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #2
    Double click the file in the Finder, see what happens. That might fix your problem.
     
  3. thread starter macrumors regular

    Joined:
    May 30, 2010
    #3
    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.
     
  4. macrumors 603

    Joined:
    Aug 9, 2009
    #4
    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:
    Code:
    xattr -h
    
    Then formulate an 'xattr' command line to remove the attributes you don't want.
     
  5. macrumors G5

    gnasher729

    Joined:
    Nov 25, 2005
    #5
    Did you double click the files? Did you think to yourself "maybe gnasher has some reason to ask me to double click the files"?
     
  6. thread starter macrumors regular

    Joined:
    May 30, 2010
    #6
    Don't gnash your teeth over this: I did double click them and they're OK.
     
  7. thread starter macrumors regular

    Joined:
    May 30, 2010
    #7
    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.
     

Share This Page