【QA】Xcodeproj doesn't know about the following xxx 問題及解決方案

環境描述

  • MacBook Pro macOS Mojave 10.14
  • Xcode 10.0 (10A255)
  • Cocoapods 1.4.0 (通過後面的操做,發現並非它的鍋啊)

問題現象描述

pod install時忽然失敗,出現下面的提示。(失敗後自動生成的模板,信息通過簡化)git

Command

/usr/local/bin/pod install
複製代碼

Report

很明顯,這一部分是問題採集github

  • What did you do?
  • What did you expect to happen?
  • What happened instead?

Stack

CocoaPods : 1.5.3
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14 (18A391)
       Xcode : 10.0 (10A255)
         Git : git version 2.17.1 (Apple Git-112)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 977a3a6f500965fa8c8aef1380337891257e47e7
複製代碼

Plugins

cocoapods-deintegrate : 1.0.2
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.3.0
cocoapods-try         : 1.1.0
複製代碼

Podfile

這裏會將當前工程中的Podfile文件內容列出xcode

Error

RuntimeError - [!] Xcodeproj doesn't know about the following attributes {"inputFileListPaths"=>[], "outputFileListPaths"=>[]} for the 'PBXShellScriptBuildPhase' isa. If this attribute was generated by Xcode please file an issue: https://github.com/CocoaPods/Xcodeproj/issues/new /Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.5.7/lib/xcodeproj/project/object.rb:321:in `configure_with_plist'
...更多的路徑信息
/usr/local/bin/pod:22:in `load' /usr/local/bin/pod:22:in `<main>'
複製代碼

問題產生的緣由

新項目,在集成Fabric時,新建了RunScript。 後來運行pod install時候就出現了這個錯誤。經排查是由於Xcode10新建RunScript時多出了Xcodeproj不認識的屬性"inputFileListPaths"=>[], "outputFileListPaths"=>[]ruby

關於Xcodeproj能夠查看這裏bash

詳細的說明能夠參考這裏app

解決辦法

剛開始覺得是Cocoapods版本不支持Xcode10致使的,結果sudo gem install cocoapods更新到1.5.3版本後,問題仍是出現了。ui

在瞭解到Cocoapods的組件後,經過sudo gem install xcodeproj更新xcodeproj組件後,問題解決。this

Tip

以前的Ruby China提供的鏡像地址https://gems.ruby-china.org已經不能使用了。請及時更換到https://gems.ruby-china.com/spa

相關文章
相關標籤/搜索