Jun 04

Xcode 와 Subversion 을 함께 쓰는 방법에 대해선 웹에 꽤 많은 문서들이 있습니다.
하지만 정작 중요한 사실 몇 가지는 안가르쳐 주더라구요. =_=
바로 Xcode 프로젝트 번들 파일안에 있는 mode1 파일과 pbxuser 파일!

처음 프로젝트 만든 것을 아무 생각없이 통채로 Subversion 에 import 하게되면,
매번 커밋할때마다 Xcode 관련된 알 수 없는 내용들이 같이 반영되어,
각 리비젼 Diff 를 확인하려하면 꽤나 골이 아파지는 현상이…

결론부터 말하자면, Xcode 프로젝트 아래에 “ProejctName.xcodeproj”란 번들 안에
mode1 파일들과 pbxuser 파일들을 Import 하지 않으면 됩니다. :)
만약 이미 커밋이 되어있다면 간단한게

# cd Project.xcodeproj
Project.xcodeproj # svn rm *.mode*
Project.xcodeproj # svn rm *.pbxuser
Project.xcodeproj # svn ci -m "OUT!!"

해버리면 되겠지요 :)
자 여기서. 잠깐 광고 하나 보고.. -_-..

하하하.. 저도 호스팅비는 벌어야죠 (…)

그럼 위 두 파일들은 무엇일까요?

도대체 pbxuser 파일엔 뭘 저장해? - Apple 관계자의 말을 들어보겠습니다.

  • Scott Tooker (Apple): “the locations for built products and intermediates files.”
  • David Ewing (Apple): “The currently active target, executable, and build style are all stored in the file … Other information includes window/view sizes, bookmarks, breakpoints, custom executables, smart groups and code sense settings.”
  • 흠흠. 그렇군요. 빌드와 관련된 잡다구리 파일들과 현재 빌드 타겟, 북마크, 디버깅을 위한
    뷁포인트등이 저장되는 곳이였네요. 이런 것들을 공동 작업자와 공유할 필욘 없겠지요?
    (게다가 파일은 Username.pbxuser 로 저장되서 이를 하나하나 커밋하다간 공동 작업자
    수만큼 파일이 불어난답니다~ -O- )

    그러면 mode1 파일은? - 역시 Apple 관계자의 말을 들어봅시다.

  • Scott Tooker: “The .mode1 file contains layout information for the project (like window positions and sizes, including sizes of sub-views and the like).”
  • Scott Tooker: “[T]he various *.mode* files track information about your workspace configuration. It’s nothing critical to the project so it is safe to throw them away.”
  • 예. 뭐 우리가 주목할 점은 마지막 줄, “It is safe to throw them away” 군요. 흐흐.
    갖다버리고 머리아픈 Subversion Diff 에 고민하지 맙시다!!