[iOS]pod initでエラー発生

スポンサーリンク

ある開発Macをお借りして、iOSアプリの開発していた時の話、
アプリをビルドする前に、pod initを実行したらエラーがはかれました。

エラーメッセージにここ見ろ的なリンクがたくさんあり、どれ見ていいのかパッとはわからない。。。

今回、XCode11のbata版を使おうとしており、CocoaPodsも対応するバージョンにアップデートする必要があったのではないかと思います。

確か、以下のコマンドで行けたと思います。
xcodeproj、cocoapodsどっちもアップデートしたと思います。
もしかしたら、後者の例のように-nオプションでフォルダを指定したかも知れないです。

sudo gem update xcodeproj
sudo gem update cocoapods -n /usr/local/bin

あと、Project Formatを"Xcode 9.3 – compatible"に変えたことも影響しているかも。
リンク先に書かれていたことをいろいろ試したので、どの操作が必要だったのか、漏れている可能性はあります。。。

エラーメッセージ

CocoaPods : 1.8.4
Xcode : 11.3.1 (11C504)

$ pod init

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

### Command

```
/usr/local/bin/pod init
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?

### Stack

```
   CocoaPods : 1.8.4
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15.2 (19C57)
       Xcode : 11.3.1 (11C504)
         Git : git version 2.21.1 (Apple Git-122.3)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
```

### Plugins

```
cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0
```

### Error

```
RuntimeError - [Xcodeproj] Unknown object version.
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.15.0/lib/xcodeproj/project.rb:227:in `initialize_from_file'
/Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.15.0/lib/xcodeproj/project.rb:112:in `open'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/init.rb:41:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:333:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours:

https://github.com/CocoaPods/CocoaPods/search?q=%5BXcodeproj%5D+Unknown+object+version.&type=Issues
If none exists, create a ticket, with the template displayed above, on:
Build software better, together
GitHub is where people build software. More than 100 million people use GitHub to discover, fork, and contribute to over...
Be sure to first read the contributing guide for details on how to properly submit a ticket:
CocoaPods/CONTRIBUTING.md at master · CocoaPods/CocoaPods
The Cocoa Dependency Manager. Contribute to CocoaPods/CocoaPods development by creating an account on GitHub.
Don't forget to anonymize any private data! Looking for related issues on cocoapods/cocoapods... - Xcode 11 Pod init crash https://github.com/CocoaPods/CocoaPods/issues/8902 [closed] [8 comments] 01 Jan 2020 - Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa https://github.com/CocoaPods/CocoaPods/issues/7835 [closed] [53 comments] 12 Sep 2019 - "Xcodeproj doesn't know about the following attributes" with Xcodeproj, Xcode 11, and pod install/update https://github.com/CocoaPods/CocoaPods/issues/8887 [closed] [7 comments] 08 Jun 2019 and 48 more at:
https://github.com/cocoapods/cocoapods/search?q=%5BXcodeproj%5D%20Unknown%20object%20version.&type=Issues&utf8=

コメント

タイトルとURLをコピーしました