Expert NEEDED on Xcode ......... ASAP.

Discussion in 'Mac Programming' started by NSG10, Aug 29, 2010.

  1. macrumors member

    Joined:
    Aug 26, 2010
    #1
    Hey guys, every time I try to create a new project in Xcode i get this error

    File: /SourceCache/DevToolsBase/DevToolsBase-1608/pbxcore/SourceControlManagement/SCMG3/SCMModel.m
    Line: 87
    Object: <SCMModel>
    Method: initialize

    couldn't create ~/.Xcode

    What does it exactly mean and how is the fix for it?
     
  2. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #2
    Does the file/folder ~/.Xcode already exist? If so, what are the file permissions on it? if not, what are the folder permissions on ~ (your home folder).

    B
     
  3. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #3
    I don't think it exists because I tried to find the directory and searched for it in spotlight and it's not there. I did repair permissions on Disk Utilities and still nothing. But my question is, how do I find permissions for that specific file or ( ~) as you mentioned, so that I find out.

    Thanks:).
     
  4. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #4
    The '~' is a Unix convention meaning your home directory. There are a few ways to check permissions on a file, using "get info" is probably the easiest. Google is your friend.

    Also it's considered rude to put "urgent", "ASAP", etc. and to use all caps in the title of a thread. The thinking goes that if the problem is so urgent, you should be willing to hire a programmer instead of asking people to volunteer their time to help you for free. I'm not saying this to be a jerk, but to give you a heads up that some people may take offense.

    You might want to take a look at this article called Getting Answers that covers the basics of etiquette on programming forums. From my experience, the members here on macrumors tend to really go out of their way to be helpful. You'll likely find people have less patients elsewhere.
     
  5. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #5
    Easier is in the eye of the beholder. ;)

    I would recommend that NSG10 learn to use the command line via Terminal.app. This might also help NSG10 with their Objective C issues. Don't try to learn the IDE and the language at the same time. Try to understand the language and programming first via command line tools and then try to use the IDE to make complicated things easier.

    IMHO IDEs are overkill if you are still at the "Hello World" stage.

    From the command line.

    Code:
    ls -al ~/.Xcode
    ls -ald ~
    works extremely well.

    B
     
  6. macrumors 6502a

    GorillaPaws

    Joined:
    Oct 26, 2003
    Location:
    Richmond, VA
    #6
    That's a fair point. One major advantage of using Xcode when you're learning is that it does code-completion for you so it cuts down on spelling errors which allows you to focus on all of the other gazillion errors you probably have.

    I do get your point about using the command line though. Although learning that was harder for me than learning the very basics of Xcode (and I'm still pretty clumsy in terminal).
     
  7. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #7
    I really tried everything and nothing will give, this is very annoying. I tried reinstalling different versions of Xcode and tried to create that file through terminal with different commands including the one that was referred to here and it's not working it just keeps telling me that the file doesn't exist. Sigh.
     
  8. macrumors 6502

    Joined:
    Aug 10, 2008
    #8
    Do you know what the dot (".") in front of the name implies?

    Are you familiar with the command "ls", and it's optional parameters?

    I'm asking because you should be familiar with the above two items.
     
  9. macrumors 603

    Joined:
    Aug 9, 2009
    #9
    Create a new admin account.
    Log out of current account.
    Log into new account.

    Launch Xcode.
    Create new project (or whatever steps caused the problem).

    Does the problem still happen?

    If so, then open the application: /Applications/Utilities/Console.app

    Then copy and post any error messages from Xcode that appear in the console log window.
     
  10. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #10
    chown33's advice is sound, as it basically creates a new place called "~" for the new user account.

    as mrbash implies, it does not seem like you understand what was posted or how to troubleshoot.

    I posted two commands. Nether of which were intended to create anything, they were intended to display the permissions on ~ and ~/.Xcode.

    ~/.Xcode can certainly not exist, but I would certainly hope that ~ does. You don't seem to be separating those things in your mind.

    Troubleshooting is all about separating the problem into simpler parts. The error message implies it can't create a file. This could be because it exists and can't be overwritten or you don't have permissions to create a new file in that folder.
    1) Does the file ~/.Xcode exist, and what are the permissions on it?
    2) Do the permissions on ~ prohibit me from creating ~/.Xcode?

    B
     
  11. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #11
    ~............... is a directory

    ~/.xcode..........No such file or directory.

    What does that mean?
     
  12. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #12
    Here's what the console says:

    Aug 30 23:34:41 macintosh Xcode[3281]: [MT] File: /SourceCache/DevToolsBase/DevToolsBase-1691/pbxcore/SourceControlManagement/SCMG3/SCMModel.m\nLine: 87\nObject: <SCMModel>\nMethod: initialize\n\ncouldn't create ~/.Xcode\nBacktrace:\n 0 0x00000001009a0fd9 -[PBXAssertionHandler handleFailureInMethod:eek:bject:fileName:lineNumber:messageFormat:arguments:] (in DevToolsInterface)\n 1 0x00000001002dab3f _XCAssertionFailureHandler (in DevToolsCore)\n 2 0x0000000100147e5b +[SCMModel initialize] (in DevToolsCore)\n 3 0x00007fff81cfa535 _class_initialize (in libobjc.A.dylib)\n 4 0x00007fff81cfa3f2 _class_initialize (in libobjc.A.dylib)\n 5 0x00007fff81d0863e prepareForMethodLookup (in libobjc.A.dylib)\n 6 0x00007fff81d00eaa lookUpMethod (in libobjc.A.dylib)\n 7 0x00007fff81cf91ba objc_msgSend (in libobjc.A.dylib)\n 8 0x0000000100147aad -[XCSourceControlManager scmSandbox] (in DevToolsCore)\n 9 0x000000010015559d -[XCSourceControlManager sandboxEntryForFileReference:] (in DevToolsCore)\n 10 0x0000000100155576 -[PBXFileReference sandboxEntry] (in DevToolsCore)\n 11 0x0000000100155440 -[PBXFileReference scmInfo] (in DevToolsCore)\n 12 0x000000010084501c -[PBXFileTableDataSource tableView:willDisplayCell:forTableColumn:row:] (in DevToolsInterface)\n 13 0x00007fff85783167 -[NSTableView preparedCellAtColumn:row:] (in AppKit)\n 14 0x00007fff8579bd1f -[NSTableView _drawContentsAtRow:column:withCellFrame:] (in AppKit)\n 15 0x00007fff8579adb8 -[NSTableView drawRow:clipRect:] (in AppKit)\n 16 0x000000010084471d -[PBXExtendedTableView drawRow:clipRect:] (in DevToolsInterface)\n 17 0x00007fff8579a6ab -[NSTableView drawRowIndexes:clipRect:] (in AppKit)\n 18 0x00007fff85799058 -[NSTableView drawRect:] (in AppKit)\n 19 0x00007fff8578f081 -[NSView _drawRect:clip:] (in AppKit)\n 20 0x00007fff8578dcf4 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 21 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 22 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 23 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 24 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 25 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 26 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 27 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 28 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 29 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 30 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 31 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 32 0x00007fff8578e05e -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:] (in AppKit)\n 33 0x00007fff8578c3c6 -[NSView
     
  13. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #13

    I created a new administrator account and it actually worked with no errors, but the new account seems as if though I formatted the device and all of my documents and papers are gone in this new account and only present in the old account how do I make this account have everything so I can remove the old one?
     
  14. macrumors 6502

    Joined:
    Aug 10, 2008
    #14
    You can copy your user directory contents over. Your documents shouldn't be a problem but your settings and and other things (iTunes) will be a problem. I'm not sure if the User Migration Assistant will let you copy to/from the same drive.

    If you have a lot of files/settings (Bookmarks, iTunes music, passwords) in your original account, you will be better of trying to repair the original user account.
     
  15. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #15
    NOTE: Be careful with cases ~/.xcode is not necessarily the same things as ~/.Xcode. This is particularly true in code.

    Output from
    Code:
    ls -ald ~
    should be something like
    Code:
    drwxrwxrwx+ 55 [I]username[/I]  staff  1870 Aug 19 12:31 /Users/[I]username[/I]
    so you must be entering it wrong.

    EDIT: You could try the old standby. Use Disk Utility to Repair Permissions. http://support.apple.com/kb/ht1452 This might fix any permissions issues with your original user.

    B
     
  16. macrumors 603

    Joined:
    Aug 9, 2009
    #16
    Stop.

    Transferring all your files to the new account is the LAST step, not the FIRST step. Transferring the files isn't even the PREFERRED step, it's the last resort if nothing else works.


    First, identify exactly what version of Xcode and Mac OS X you're using.

    Second, make a backup of everything in your current admin account to a safe place. An external disk or a shared file server is safe enough.

    Third, copy and paste this command-line exactly as given into Terminal, then paste the output into a post.
    If you're not logged into your original admin account, do that next. Then launch Terminal.app using that account, and again copy and paste this exact command-line into a Terminal window, then paste the output into a post:
    Code:
    id -p;  ls -la ~
    
     
  17. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #17
    NSG10, when you do Please wrap it in CODE tags to avoid the output being formatted. See your post with the console output.

    Code:
    :o
    becomes :eek: when not wrapped in CODE tags. Embarrasing. ;)

    B
     
  18. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #18
    I tried the link you gave me, but still no results. The only thing that's working is when I change admin. I'll leave that as the final solution, but in case is there anyway that I can get my data to the admin I created easily, so that I can delete the old one?
     
  19. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #19
    You're still not getting it.

    What do you mean "no results" we're looking to find out the file permissions in your broken account's home folder, not trying to fix your problem (yet) until we know what the problem is.

    I repeat. None of the commands posted since your last post make any attempt to fix your problem.

    chown33 asked you to post the output from the commands, did they not generate any output?

    Put another way, we are still in the diagnosis stage. We'll cure or kill the patient once we know what's ailing him.

    B
     
  20. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #20
    I'm using iPhone SDK 4.0.2 on OSX 10.6.4
    Heres what I got in the output.................

    macintosh:~ niafgana$ ls -la /Users
    total 0
    drwxr-xr-x 6 root admin 204 Aug 30 23:45 .
    drwxrwxr-t 32 root admin 1156 Jul 16 18:01 ..
    -rw-r--r-- 1 root wheel 0 Jul 1 2009 .localized
    drwxrwxrwt 12 root wheel 408 Jul 31 19:40 Shared
    drwxr-xr-x+ 23 niafgana staff 782 Dec 11 2009 niafgana
    drwxr-xr-x+ 14 nsg staff 476 Aug 30 23:55 nsg
    macintosh:~ niafgana$ id -p; ls -la ~
    uid niafgana
    groups staff _developer _lpoperator _lpadmin _appserveradm admin _appserverusr localaccounts everyone com.apple.sharepoint.group.1 com.apple.access_screensharing com.apple.sharepoint.group.2
    total 72
    drwxr-xr-x+ 23 niafgana staff 782 Dec 11 2009 .
    drwxr-xr-x 6 root admin 204 Aug 30 23:45 ..
    -rw------- 1 niafgana staff 3 Sep 18 2009 .CFUserTextEncoding
    -rw-r--r--@ 1 niafgana staff 24580 Aug 29 00:06 .DS_Store
    drwxr-xr-x@ 3 niafgana staff 102 Oct 2 2009 .DownloadManager
    drwx------ 2 niafgana staff 68 Aug 31 02:52 .Trash
    drwxr-x--x 3 niafgana staff 102 Sep 28 2009 .adobe
    -rw------- 1 niafgana staff 471 Aug 31 02:01 .bash_history
    drwx------ 3 niafgana staff 102 Oct 10 2009 .cups
    drwxr-xr-x 3 niafgana staff 102 Oct 6 2009 .mplayer
    drwxr-xr-x 3 niafgana staff 102 Oct 28 2009 .ssh
    drwx------+ 5 niafgana staff 170 Aug 31 02:51 Desktop
    drwx------+ 11 niafgana staff 374 Aug 28 00:07 Documents
    drwx------@ 6 niafgana staff 204 Aug 30 02:59 Downloads
    drwxr-xr-x 7 niafgana staff 238 May 10 19:36 FrostWire
    drwx------+ 50 niafgana staff 1700 Jul 25 23:11 Library
    drwx------+ 8 niafgana staff 272 Aug 19 21:53 Movies
    drwx------+ 7 niafgana staff 238 Mar 19 23:23 Music
    drwx------+ 8 niafgana staff 272 Aug 19 21:53 Pictures
    drwxr-xr-x+ 6 niafgana staff 204 Dec 2 2009 Public
    drwxr-xr-x+ 6 niafgana staff 204 Oct 16 2009 Sites
    drwxr-xr-x 10 niafgana staff 340 Aug 19 21:54 iPhone Stuff
    drwxr-xr-x 3 niafgana staff 102 Aug 19 21:54 pwnage
     
  21. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #21
    The unix level permissions are the same for both of the accounts, and I don't see anything odd with the groups your broken account belongs to.

    It may be something in the ACLs, so try:

    Code:
    ls -lde /Users/n*
    and see if there is any difference in the ACLs

    You could also try:

    Code:
    mkdir ~/.Xcode
    and see what that does before you try again.

    B
     
  22. macrumors 603

    Joined:
    Aug 9, 2009
    #22
    When logged into the niafgana account, copy and paste this command-line into a Terminal window.
    Code:
    find ~/Library -iname '*xcode*' -ls
    
    Post the output.
     
  23. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #23
    This is what I got.

    macintosh:~ niafgana$ ls -lde /Users/n*
    drwxr-xr-x+ 23 niafgana staff 782 Dec 11 2009 /Users/niafgana
    0: group:everyone deny delete
    drwxr-xr-x+ 14 nsg staff 476 Aug 30 23:55 /Users/nsg
    0: group:everyone deny delete
    macintosh:~ niafgana$ mkdir ~/.Xcode
    mkdir: /Users/niafgana/.Xcode: Operation not permitted
    macintosh:~ niafgana$ find ~/Library -iname '*xcode*' -ls
    8571583 0 drwxr-xr-x 4 niafgana staff 136 Aug 31 02:51 /Users/niafgana/Library/Application Support/Developer/Shared/Xcode
    8571572 0 drwxr-xr-x 2 niafgana staff 68 Aug 30 00:12 /Users/niafgana/Library/Application Support/Xcode
    2734779 0 drwxr-xr-x 3 niafgana staff 102 Aug 31 00:00 /Users/niafgana/Library/Caches/com.apple.Xcode
    8383856 8 -rw-r--r-- 1 niafgana staff 164 Aug 29 02:18 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fosdir.com%2Fml%2Fxcode-users%2F2010-04%2Fmsg00300.html.webhistory
    7801735 8 -rw-r--r-- 1 niafgana staff 197 Aug 25 22:24 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fphotoaperture.com%2Fblog%2F2009%2F05%2F20%2Fhow-to-uninstall-xcode-and-iphone-sdk%2F.webhistory
    7801703 8 -rw-r--r-- 1 niafgana staff 203 Aug 25 22:23 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fpushkararora.com%2Fhow-to%2Fhow-to-uninstall-xcode-completely%2F.webhistory
    8009710 40 -rw-r--r-- 1 niafgana staff 16879 Aug 26 08:12 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fstackoverflow.com%2Fquestions%2F400894%2Fxcode-iphone-app-codesign-error.webhistory
    8383871 8 -rw-r--r-- 1 niafgana staff 174 Aug 29 02:19 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.cocoabuilder.com%2Farchive%2Fxcode%2F258006-xcode-internal-error.html.webhistory
    8009726 24 -rw-r--r-- 1 niafgana staff 8624 Aug 26 08:15 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.google.com%2F%23hl=en&safe=active&q=How+can+i+fix+xcode+errors&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=9d19a192c6871a85.webhistory
    7801647 8 -rw-r--r-- 1 niafgana staff 194 Aug 25 22:29 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.google.com%2Fsearch?q=how%2520to%2520uniinstall%2520xcode&ie=utf-8&oe=utf-8&safe=active.webhistory
    7801645 16 -rw-r--r-- 1 niafgana staff 7544 Aug 25 22:22 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.google.com%2Fsearch?q=how%2520to%2520uniinstall%2520xcode&ie=utf-8&oe=utf-8.webhistory
    8383833 8 -rw-r--r-- 1 niafgana staff 200 Aug 29 02:19 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.google.com%2Fsearch?q=xcode%2520internal%2520error%2520fixes&ie=utf-8&oe=utf-8&safe=active.webhistory
    8383834 16 -rw-r--r-- 1 niafgana staff 7774 Aug 29 02:18 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fwww.google.com%2Fsearch?q=xcode%2520internal%2520error%2520fixes&ie=utf-8&oe=utf-8.webhistory
    7801881 8 -rw-r--r-- 1 niafgana staff 225 Aug 25 22:30 /Users/niafgana/Library/Caches/Metadata/Safari/History/http:%2F%2Fx10hosting.com%2Fforums%2Ftutorials%2F118472-how-uninstall-xcode-developer-tools-only-mac-users.html.webhistory
    8110124 0 drwxr-xr-x 3 niafgana staff 102 Aug 30 23:27 /Users/niafgana/Library/Caches/xcodebuild
    8942023 24 -rw------- 1 niafgana staff 12189 Aug 31 02:51 /Users/niafgana/Library/Preferences/com.apple.Xcode.plist
    1329090 0 drwxrwxrwx 6 niafgana staff 204 Oct 21 2007 /Users/niafgana/Library/Widgets/iStat nano.wdgt/iStatNano.bundle/Contents/s/iStatNano.xcodeproj
    macintosh:~ niafgana$
     
  24. Moderator

    balamw

    Staff Member

    Joined:
    Aug 16, 2005
    Location:
    New England
    #24
    Well at least that's consistent. You could try
    Code:
    mkdir ~/foobar
    sudo mkdir ~/.Xcode
    
    The first to see if you can create any folders here, the second to see if root can do it.
    I have these 5 and the ones I'm ignoring are the Safari ones + Widgets. Your sizes seem quite a bit bigger than mine though, but I'm still running 3.2.3.

    B
     
  25. thread starter macrumors member

    Joined:
    Aug 26, 2010
    #25
    Here's what it gave me:

    macintosh:~ niafgana$ mkdir ~/foobar
    mkdir: /Users/niafgana/foobar: Operation not permitted
    macintosh:~ niafgana$ sudo mkdir ~/.Xcode
    mkdir: /Users/niafgana/.Xcode: Operation not permitted
     

Share This Page