Issues moving Xcode root Project directory

Discussion in 'iOS Programming' started by nashyo, Feb 14, 2012.

  1. macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #1
    Hi,

    I have a project saved to a directory in my user folder. I would like to move it to a different directory, but I had serious problems the last time I moved a project and it's bundle contents.

    The first issue I had was files turning red in colour and needing to have their directories re-established. I did this manually for each individual file (in file inspector).

    Second, the build settings went screwy. I can't remember exactly how I fixed the issue.

    I would like to move a project, but I'm worried about the stress it will cause. Does someone know a simple mechanisms, or at least the things I need to re-configure in build settings etc?

    Thanks
     
  2. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    The problem is, when you drag in images or files, do you click the "copy if necessary" option? this will actually move it into your project, instead of just file link it from somewhere else, which will cause the red items to appear when you actually move your project.
    If you allways copy, then just close the project, move it, open it again from new folder, and should be fixed ;)
     
  3. thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #3
    I always copy files to my project bundle. However, I can't just close the project, move the bundle and open again.

    If my project was located at the following directory

    Folder 1 > Folder 2 > Project Bundle

    How could i move it to the following directory

    Folder 1 > Project Bundle

    Without any build errors or missing file warnings?
     
  4. macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #4
    My question remains. If you close the project (in my case, so i'm not responsible for errors). just cut and paste the files in the folder above, should be no issue, unless you are hardcoded looking for other links inside the folders like '../../Llalala.m'
    So don't really know how to help u further
     
  5. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #5
    What do you mean by "Project Bundle", nashyo? Are you moving the projectname folder that contains the .xcodeproj file and the projectname subfolder (and possibly some other files)? Or something else?
     
  6. thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #6
    Thanks for the replies. I'm trying to move the Xcode.projxxx file, along with everything else (h and m files, info.plist etc). The whole directory for my project needs to move.

    What if for example, I wanted to move my project to a new computer via a flash USB stick, and put on my mates desktop? Im sure I would get the same problem.
     
  7. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #7
    Can you show us, perhaps via a screenshot, what your project directory looks like? Also, what version of Xcode are you using and what version OS?

    It certainly is doable, since I've done it on numerous occasions. When you open the moved project, are all the files in red, or only some of them? If only some of them, are they files that you've "brought into" your project, either via drag-and-drop or "Add File..."?
     
  8. macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #8
    All of Apple's sample code is delivered as a zip file and lots of open source code is similar. Just download it and build. Your projects should work the same way.

    The only problems should be if there are project files that are outside the project folder or if some project files are referenced by full paths.

    Anyway, have you tried this?
     
  9. thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #9
    Hi,

    Here is a directory for one of my projects.
    [​IMG]

    As you can see in the pic, I want to move the content in Z, back into Y.

    It's not essential that I move this directory. But I need to figure this out, purely because it's eluding me and I find it irritating.

    If I move the contents in Z backwards into area Y, like this... (I removed the empty 'surgical risk' folder)

    [​IMG]

    the following happens

    (yes, I plucked up the courage to do it, knowing I would receive error codes of pain.

    [​IMG]

    Can anyone help with this?

    Thanks

    P.S. the tools I'm working with are stated in my signature area, below my posts.
     

Share This Page