LoginSignup
61
61

More than 5 years have passed since last update.

pod update する度にpbxproj ファイルの形式が変わってしまう君へ

Last updated at Posted at 2014-09-20

前提

課題

  • pod install/update するとpbxproj ファイルがXML 形式に変換されてしまうので、うっかりファイルの追加/削除 をしていたコミットとコンフリクトすると、正しくマージできなくなってしまう
  • 特にファイル構成に変更がなくても差分がどっさり出てきてしまう(ように見える) ので、嫌な気持ちになる

解決策

  • xcproj というCLI のコマンドを入れておく
brew install xcproj
  • そうすると、CocoaPods がxcproj のコマンドを認識して、old-style にconvert してくれる

注意点

brew uninstall xcproj
brew install xcproj

おまけ

  • brew install xcproj しようとしたら、こけた。
$ brew install xcproj
==> Downloading https://github.com/0xced/xcproj/archive/0.1.2.tar.gz
Already downloaded: /Library/Caches/Homebrew/xcproj-0.1.2.tar.gz
==> xcodebuild -project xcproj.xcodeproj -scheme xcproj SYMROOT=build DSTROOT=/usr/local/Cellar/xcproj/0.1.2 INSTALL_PATH=/bin -verbose install
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
  • 理由は、Xcode5 と6 を共存させていて、アプリケーションの名前をXcode => Xcode6 に変更していたから。名前を元に戻したら通った。
61
61
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
61
61