DEV_Larva

pod init 안될때 본문

Xcode/Xcode 오류 모음집

pod init 안될때

NelchuPapa 2022. 11. 13. 18:36
반응형

Xcode를 사용하다 보면 dependencies를 추가하기 위해 pod를 사용하는 경우가 있다. 그런데 최근 Xcode를 14.1로 업데이트하고 나서부터 갑자기 멀쩡했던 pod를 사용할 때 이상한 에러들을 만났다. 

 

 

에러 내용

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

### Command

```
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod init
```

### Report

* What did you do?

* What did you expect to happen?

* What happened instead?


### Stack

```
   CocoaPods : 1.11.3
        Ruby : ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
    RubyGems : 3.3.11
        Host : macOS 13.0.1 (22A400)
       Xcode : 14.1 (14B47b)
         Git : git version 2.37.3
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.1.2_1/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/
```

### Plugins

```
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0
```

### Error

```
RuntimeError - [Xcodeproj] Unknown object version (56).
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:228:in `initialize_from_file'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/xcodeproj-1.21.0/lib/xcodeproj/project.rb:113:in `open'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command/init.rb:41:in `validate!'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/claide-1.1.0/lib/claide/command.rb:333:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25:in `load'
/opt/homebrew/Cellar/cocoapods/1.11.3/libexec/bin/pod:25: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+%2856%29.&type=Issues

If none exists, create a ticket, with the template displayed above, on:
https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket:
https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...
 - pod init after update it to XCODE 14
   https://github.com/CocoaPods/CocoaPods/issues/11546 [open] [14 comments]
   2 days ago

 - Error occurred when executing pod init
   https://github.com/CocoaPods/CocoaPods/issues/11536 [open] [15 comments]
   6 hours ago

 - RuntimeError - [Xcodeproj] Unknown object version.
   https://github.com/CocoaPods/CocoaPods/issues/10099 [closed] [4 comments]
   6 weeks ago

and 10 more at:
https://github.com/cocoapods/cocoapods/search?q=%5BXcodeproj%5D%20Unknown%20object%20version%20%2856%29.&type=Issues&utf8=✓
The file /Users/baegdaehong/Desktop/xcode/KaKaoLogin(UIKit)-tuto/Podfile does not exist.

 

정말 어떤게 문제인지 알아보기 힘들게 오류 문구가 상당히 길다. 그래서 또 조사를 해보니 Xcode 13에도 동일한 문제가 일어났다는 Stackoverflow의 글들을 확인할 수 있었고, 프로젝트의 Projct Document를 들어가 보면 나의 경우 Xcode 14.0 - compatible이라고 설정되어있었다. 그래서 이걸 아래 사진처럼 13.0으로 버전을 낮춰 보았다.

 

그랬더니?

무슨일이 있었냐는 듯이 깔끔하게 해결이 되어버렸다. 그러고 나서 pod install까지 해보니 문제없이 정상적으로 작동이 되었다!! 그래서 오류가 나온 김에 밥도 먹고 잠깐 쉬려고 했는데 그럴 필요 없이 계속 공부하라는 하나님의 뜻이었나 봅니다.. 꼬우

반응형