生成pods项目时出错 - Pod安装

时间:2015-06-27 04:56:39

标签: ios cocoapods

我有一个使用可可豆荚的工作项目。我尝试'pod install'并得到了这个奇怪的错误:

int

不知道为什么我将Xcode项目文件写入Generating Pods project - Creating Pods project - Adding source files to Pods project - Adding frameworks to Pods project - Adding libraries to Pods project - Adding resources to Pods project - Linking headers - Installing targets - Installing target `Pods-NIDropDown` iOS 7.0 - Installing target `Pods-SDWebImage` iOS 7.0 - Installing target `Pods-SQCommonUtils` iOS 7.0 - Installing target `Pods` iOS 7.0 - Running post install hooks - Writing Xcode project file to `Pods/Pods.xcodeproj` 2015-06-27 01:20:37.359 ruby[3841:138874] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8123.33/IDEFoundation/Initialization/IDEInitialization.m:590 Details: Assertion failed: _initializationCompletedSuccessfully Function: BOOL IDEIsInitializedForUserInteraction() Thread: <NSThread: 0x7fedd50822b0>{number = 1, name = main} Hints: None Backtrace: 0 0x00000001057f7047 -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation) 1 0x00000001057f67d4 _DVTAssertionHandler (in DVTFoundation) 2 0x00000001057f6a40 _DVTAssertionFailureHandler (in DVTFoundation) 3 0x00000001057f69a2 _DVTAssertionFailureHandler (in DVTFoundation) 4 0x0000000106bbf1a9 IDEIsInitializedForUserInteraction (in IDEFoundation) 5 0x000000010ab2ea5d +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore) 6 0x000000010ab305e2 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore) 7 0x00007fff9262af44 ffi_call_unix64 (in libffi.dylib) Abort trap: 6 时出错。我尝试过重新安装可可豆荚,但没有成功。

我对iOS开发很不错,所以任何提示都会很好。

7 个答案:

答案 0 :(得分:28)

似乎是使用Xcode 7进行项目序列化的问题.Cocoapods依赖于xcodeproj,它有最新测试版的bug。他们发布了一个快速发布来解决这个问题。在终端中运行:

gem install xcodeproj -v 0.24.3

(可能要sudo那个)

答案 1 :(得分:21)

我在使用Xcode 7 beta 2时遇到了这个问题。设置xcode-select回到Xcode的发布版本帮助了我。

尝试在终端中运行:

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

然后再次尝试安装CocoaPods:

pod install

然后我用这个命令回到Xcode测试版没有问题:

sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer

答案 2 :(得分:21)

对于那些在最近的Xcode更新后得到错误的人,我做了上面的工作,直到我更新了cocoa pods(从版本0.36.0开始)它才能工作:

sudo gem update

将其更新为0.38.2(我也看到过对0.37.x有问题的引用)

答案 3 :(得分:4)

您只需按照以下终端命令操作即可。它可能对你有帮助。

$sudo gem update —system
$sudo gem uninstall cocoapods
$sudo gem install cocoapods
$pod setup
$cd <project path>
$pod init
add files(frameworks)($pod outdated- if already pod exists)
$pod install
$pod update(if you need)

答案 4 :(得分:3)

重试&#39; pod安装之前&#39;打开第二个终端窗口并拖尾系统日志:

tail -f /var/log/system.log

你学到的东西可能会让你感到惊讶。我的报道

  

pod install [20810]:[MT] DVTPlugInLoading:无法加载插件com.apple.dt.dbg.DebuggerFoundation(/Applications/Xcode.app/Contents/PlugIns/DebuggerFoundation.ideplugin)的代码,错误=错误域= NSCocoaErrorDomain代码= 3587&#34;无法加载捆绑包“DebuggerFoundation”,因为它已损坏或缺少必要的资源。&#34; (dlopen_preflight(/Applications/Xcode.app/Contents/PlugIns/DebuggerFoundation.ideplugin/Contents/MacOS/DebuggerFoundation):未加载库:@ rpath / IBAutolayoutFoundation.framework / Versions / A / IBAutolayoutFoundation

因为我通过Mac App Store安装Xcode 7.0.1最终被破坏了,所有其他有用的响应者的建议都没有注定要工作。

当你有足够的时间彻底排除故障时,这些事情永远不会突然出现。现在对于我们的发布时间表来说当然不是时候了,所以这里有用的(OS X 10.10.5,Xcode 7.0.1的Xcode 6.4)(这是在要求App Store重新安装7.0之后) 0.1)

rm -Rf /Applications/Xcode.app

然后要求Mac App Store重新安装Xcode 7.0.1

然后我们就可以继续更新CocoaPods等等。

答案 5 :(得分:1)

sudo xcode-select -r解决了问题

答案 6 :(得分:1)

每个人都提出了一个xcode问题,为我解决的问题是删除了所有的cocoapods宝石,然后重新安装它们:

gem list | grep cocoapods | xargs gem uninstall -aIx
gem uninstall xcodeproj
相关问题