开发者

Xcode does not pick up new class files in SVN

开发者 https://www.devze.com 2023-02-11 08:51 出处:网络
I have an SVN repository that I have updated my local code from, and this update included new class files. When I went to build, there was a linker error due to the fact that code in my files that wer

I have an SVN repository that I have updated my local code from, and this update included new class files. When I went to build, there was a linker error due to the fact that code in my files that were previously in Xcode had been updated and referenced a new file. this file has 开发者_运维百科been added to my directory in Finder (i.e. my local filesystem is up to date) but these new files have not been added to my xcode.

My question is: how do new files become found by Xcode?? or which metadata file stores the files that show up in the right hand pane in Xcode? (so I can check if this is updated or not)


Within Finder right click on MyProject.xcodeproj and select Show Package Contents. This will display the three files XCode uses to control the project structure. This is like the solution and project files from Visual Studio if you are familiar with those.

Within the package contents are files for each user, <username>.pbxuser and others depending on things like Core Data usage. The key file you need is project.pbxproj. We check ours into SVN with XCode and when it gets updated and you update the project you'll get a warning asking you if you want to keep your existing or read off disk. Read of the disk to pick up the newly added files that SVN has pulled down to your dev machine.

Be very careful to ensure that you resolve conflicts if you've made your own changes to the project including adding any new files, groups etc. The compare tool is useful to select the right changes but I've found I had to save the merged project.pbxproj file elsewhere and then manually add back in to the MyProject.xcodeproj package.

It can be easier to manage a duplicate copy of the project from a Windows machine as I;ve yet to find an OSX client for SVN that gets anywhere near Tortoise.


Xcode doesn't "find" files, Xcode has to be told where files are. So if "svn up" pulls down new files, you either tell Xcode that there are new files. If the other developers updated the project files to so that their Xcode knows where these files are, if you update your project files it should be aware of the new files.

0

精彩评论

暂无评论...
验证码 换一张
取 消