PDA

View Full Version : Issues moving Xcode root Project directory




nashyo
Feb 14, 2012, 11:11 AM
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



jnoxx
Feb 15, 2012, 02:30 AM
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 ;)

nashyo
Feb 16, 2012, 01:30 AM
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 ;)

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?

jnoxx
Feb 16, 2012, 02:28 AM
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

dejo
Feb 16, 2012, 09:21 AM
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?

nashyo
Feb 16, 2012, 09:49 AM
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.

dejo
Feb 16, 2012, 10:17 AM
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.
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?

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.
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..."?

PhoneyDeveloper
Feb 16, 2012, 05:43 PM
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?

nashyo
Feb 17, 2012, 01:46 PM
Hi,

Here is a directory for one of my projects.
http://i42.tinypic.com/6p28lv.png

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)

http://i40.tinypic.com/dq0xe0.png

the following happens

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

http://i42.tinypic.com/xf3w4m.png

Can anyone help with this?

Thanks

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