Xcode 5 Couldn't build module Cocoa after installing Xcode 6 beta 2

喜夏-厌秋 提交于 2019-12-02 18:24:30

问题


I just installed Xcode 6 beta 2. After trying it out, I wanted to continue my work and build a project (created with 5.1 and never opened in Xcode 6), in Xcode 5.1 but I get the following error:

Could not build module 'Cocoa'

The prefix file the error is coming from looks like this (I didn't modified it):

#ifdef __OBJC__
    #import <Cocoa/Cocoa.h>
#endif

Every time I try to build this message is logged:

xpcd[235]: Info.plist does not contain an XPCService dictionary: /System/Library/Frameworks/Security.framework/XPCServices/SecurityAgent.xpc

I'm not sure the above message has anything to do with the problem.

Additionally now it seems to me like I can't build any project using Xcode 5.


回答1:


If you opened that project in Xcode 6, it's busted now. You need to revert it to before that. Hope you have SCM in place, or at least TimeMachine.

Otherwise, check what xcode-select -p says. You may have to re-select Xcode 5. Alternatively, open Xcode Preferences and select the last tab “Locations”. There is a pop-up menu for Command Line Tools. It may still point to Xcode 6.




回答2:


I finally restored Xcode 5 using Time Machine to a version before my install of Xcode 6 Beta 2. It works again, but I have no idea what Xcode 6 Beta 2 did to break it.



来源:https://stackoverflow.com/questions/24351496/xcode-5-couldnt-build-module-cocoa-after-installing-xcode-6-beta-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!