LoginSignup
7
6

More than 5 years have passed since last update.

Xcodeを使った開発で、gitで他人とコードを共有する際に気をつけること

Last updated at Posted at 2015-01-29

概要

  • 他人とコードを共有する際の設定を間違えてしまったためにschemeが共有されなかったので調べてみた
  • Xcode6.1.1において確認

問題点

  • gitでコードを管理する際、Xcodeで何かする度にxcuserstateが変更されてしまう。そこで.gitignoreを編集した。
  • .gitignoreに以下の記述をしたところ、他の人がpullしてきたときにschemeが見えなくなってしまった。
### https://raw.github.com/github/gitignore/16053ba600e2a3cd49a737fa22ecbaf1f92b61ca/Global/Xcode.gitignore

build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.xcuserstate

直した設定

  • XcodeのRunボタンの右のスキーム名をクリック
  • Manage Schemeを選択
  • (Tips)ちなみにManage Schemesで出てくるポップアップでScheme名を選択してReturnを押すとScheme名変更ができる
  • 右側のsharedにチェックを入れる
  • gitでコミットして共有

問題点の理解

  • デフォルトだとScheme設定はユーザ固有の模様?
  • ユーザ固有の設定はxcuserstateの下にあるっぽい?
  • そしてgitignoreで無視リストに入れたら共有されなくなってしまった模様...
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6