How to change directory of project?

I created a project (cocos2dx v4 cpp) in the desktop folder of my Mac. It works fine and I am able to build the Xcode project using the command line.

But if I copy the folder to another location it no longer builds as it seems to reference the desktop folder.

What file does one need to update so that the project is portable and can be copied to some other directory?

Avoid copying the folder, but if you do, delete the build folder, and re-generate it with CMake.

Spot on, it can be a pain. I have issues where if I modify the CMAKE file then Xcode moans and I have to do a little bit of setup again.

That’s the most frustrating thing about Xcode, especially the section on auto-signing the output once it’s built, because there doesn’t seem to be a way to handle it via CMake (and not an issue with CMake, but with XCode). Any time the project is re-created, that section has to be set manually again.

Ok, I will try that.Thanks

Which section? There is another post that describes how to edit the CMake so some things do not need to be set in Xcode again and again…. I am not testing on device at present, but as soon as I build with cmake I can run in Xcode without changing anything in Xcode

The section regarding provisioning profiles, as described in this article: https://www.testdevlab.com/blog/2019/07/24/xcode-provisioning-profile-automation-for-ci/

That article has some good info as well that should help you with Xcode and CMake.

Ok, thanks :pray:

I know right, alas it is the developers journey.

I have a new question now. What happens if multiple developers are working on a project then?

  • One solution is to just check in the source code files (classes, android, iOS.mac etc). But then setting up a new environment becomes tedious.

Because on each developers machine, the hard drive name, path to development environment etc may be different.