Question

Basically I have all the .h and .m files under "Classes" directory as well as the "Classes" group. Then I regret on giving such a name, so I changed the directory to "src" using "mv" command line and then removed "Classes" group and dragged "src" back in. Then when i run my code, I got a sigabrt error immediately. Anyone knows why? I tried reopen xcode project, which doesn't fix it. Thanks a lot!

Was it helpful?

Solution

I had to do this once for 117 source files that I wanted to organize differently. Here is what I did:

  1. Delete all source files and groups from the project (remove reference) and quit Xcode.
  2. Go look at your files in the finder, create some new folders and move the source files as you see fit.
  3. Back into Xcode, drag the root folder of your new source file hierarchy in the project file list. Xcode will create group folders for any subfolder you created, thus matching exactly your hierarchy on disk (there is an option for that in the import dialog). Don't forget to check that the imported files are added to your target (again in the import dialog box).

Your project should then compile as before. There are other ways to achieve this, but I found this method to be the most efficient.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top