'pod install' giving error on Xcode 7

2019-02-22 12:16发布

I have updated my cocoapods(0.38.2) gem and xcodeproj(0.27.2), but still getting error:-

Writing Xcode project file to `Pods/Pods.xcodeproj`
2015-09-24 09:40:27.969 ruby[12098:428715] [MT] DVTAssertions:      ASSERTION FAILURE in      /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-8227/IDEFoundation/Initialization/IDEInitialization.m:590
Details:  Assertion failed: _initializationCompletedSuccessfully
Function: BOOL IDEIsInitializedForUserInteraction()
Thread:   <NSThread: 0x7fb9adbd99d0>{number = 1, name = main}
Hints: None
Backtrace:0  0x000000011038ca5c -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
  1  0x000000011038c1e9 _DVTAssertionHandler (in DVTFoundation)
  2  0x000000011038c455 _DVTAssertionFailureHandler (in DVTFoundation)
  3  0x000000011038c3b7 _DVTAssertionFailureHandler (in DVTFoundation)
  4  0x00000001118c5f5c IDEIsInitializedForUserInteraction (in IDEFoundation)
  5  0x000000011451deb9 +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore)
  6  0x000000011451fa3e +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore)
  7  0x00007fff8da7df44 ffi_call_unix64 (in libffi.dylib)
[1]    12098 abort      pod install --verbose

4条回答
乱世女痞
2楼-- · 2019-02-22 12:55

Try sudo xcode-select -r

If it didn't help, let me know

it helped for me

'pod --version' returned 0.37.2 (even after updating cocoa pods to 0.38.2) it would update but still for some reason use 0.37.2 for all pod commands
So what I did: 
1) run 'pod --verbose' to locate the 0.37.2, delete it manually
2) run 'gem list --local | grep cocoapods' to find all cocoa pods installed on machine
2.1) 'gem uninstall' everything returned by step2 
2.2) run 'gem list --local | grep cocoapods' just to make sure everything is deleted
3) '[sudo] gem uninstall cocoapods'
4) '[sudo] gem install cocoapods'

Or try home-brew update if you installed pod via brew before

查看更多
Bombasti
3楼-- · 2019-02-22 12:57

Have you tried to update your cocoapods gem using sudo ?

sudo gem update

查看更多
霸刀☆藐视天下
4楼-- · 2019-02-22 13:00

I just installed newer version, all error went away. sudo gem install cocoapods --pre. I had 0.37.2, i updated to a beta version 0.39.0

查看更多
迷人小祖宗
5楼-- · 2019-02-22 13:00

I got same error while pod installation.

Following commands work for me.

~> sudo gem uninstall cocoapods
~> sudo gem install cocoapods
~> pod install
查看更多
登录 后发表回答