在Xcode 6和Xcode 4.5之间切换

时间:2014-12-29 18:51:32

标签: ios xcode xcode4.5

使用OS X Yosemite

删除了Xcode6,并按照本指南安装了Xcode 4.5: http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html

在不同的文件夹下安装Xcode 4.5并使用命令" sudo xcode-select --switch /Applications/Xcode4.5/Xcode.app" (在终端中)切换到新的Xcode4.5版本(来自上面的指南)。

收到错误消息,指出不兼容的" MobileDevice.Framework"在首次发布时安装。按照本指南修复该问题:Xcode 4.4.1 does not work properly under OSX Mavericks 运行命令后:" sudo rm -rf /System/Library/PrivateFrameworks/MobileDevice.framework"从上面的堆栈溢出问题,我得到另一个错误,经过多天的研究后我无法解决:

Process:               Xcode [2422]
Path:                  /Applications/Xcode4.5.2/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               4.5.2 (1847)
Build Info:            IDEApplication-1847000000000000~5
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Xcode [2422]
User ID:               501

Date/Time:             2014-12-29 13:36:32.026 -0500
OS Version:            Mac OS X 10.10.1 (14B25)
Report Version:        11
Anonymous UUID:        1076DD40-2DC4-A657-02AE-90EA3278917B


Time Awake Since Boot: 4200 seconds

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 4G2008a
UNCAUGHT EXCEPTION (NSInternalInconsistencyException): Extension Xcode.Device.iPhone class 'DVTiPhoneLocator' not found for required key 'locatorClass'
UserInfo: {
  DVTExtensionClassNameErrorKey = DVTiPhoneLocator;
  DVTExtensionIdentifierErrorKey = "Xcode.Device.iPhone";
  DVTPlugInExecutablePathErrorKey = "/Applications/Xcode4.5.2/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/IDEiPhoneSupport.ideplugin";
  DVTPlugInIdentifierErrorKey = "com.apple.dt.IDE.IDEiPhoneSupport";
}
Hints: None
Backtrace:
0  0x00007fff85859634 __exceptionPreprocess (in CoreFoundation)
1  0x00007fff8b2ac6de objc_exception_throw (in libobjc.A.dylib)
2  0x0000000109c1eff1 -[DVTExtension _adjustClassAttribute:forKey:inParameterData:] (in DVTFoundation)
3  0x0000000109c1ec56 -[DVTExtension _adjustClassReferencesInParameterData:usingSchema:] (in DVTFoundation)
4  0x0000000109c7554f -[DVTExtension _fireExtensionFault:] (in DVTFoundation)
5  0x0000000109c75110 __63-[DVTExtension _valueForKey:inParameterData:usingSchema:error:]_block_invoke_0 (in DVTFoundation)
6  0x0000000109c9c446 __DVTDispatchSync_block_invoke_0 (in DVTFoundation)
7  0x00007fff8b210c13 _dispatch_client_callout (in libdispatch.dylib)
8  0x00007fff8b211e5e _dispatch_barrier_sync_f_invoke (in libdispatch.dylib)
9  0x0000000109c9c263 DVTDispatchSync (in DVTFoundation)
10  0x0000000109c9c077 DVTSyncPerformBlock (in DVTFoundation)
11  0x0000000109bf917d -[DVTDispatchLock performLockedBlock:] (in DVTFoundation)
12  0x0000000109c75007 -[DVTExtension _valueForKey:inParameterData:usingSchema:error:] (in DVTFoundation)
13  0x0000000109c1e40d -[DVTExtension valueForKey:] (in DVTFoundation)
14  0x0000000109c23c03 +[DVTDevice _knownDeviceLocators] (in DVTFoundation)
15  0x0000000109c237bc -[DVTDeviceManager startLocating] (in DVTFoundation)
16  0x000000010a50d3d3 __IDEInitialize_block_invoke_0 (in IDEFoundation)
17  0x000000010a50d986 IDESetSafeToLoadMobileDevice (in IDEFoundation)
18  0x000000010a81f6e3 -[IDEWelcomeWindowController _showFirstLaunchExperienceIfAppropriate] (in IDEKit)
19  0x000000010a81f604 -[IDEWelcomeWindowController openWelcomeWindowAfterFirstLaunchExperienceIfAppropriate:] (in IDEKit)
20  0x000000010a81f56e -[IDEApplicationController applicationOpenUntitledFile:] (in IDEKit)
21  0x00007fff8dcdfa5a -[NSApplication _doOpenUntitled] (in AppKit)
22  0x00007fff8dc18b91 __58-[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:]_block_invoke (in AppKit)
23  0x00007fff8e33e5b0 __95-[NSPersistentUIManager restoreAllPersistentStateRegisteringAsReadyWhenDone:completionHandler:]_block_invoke557 (in AppKit)
24  0x00007fff8df22389 __97-[NSDocumentController(NSInternal) _autoreopenDocumentsIgnoringExpendable:withCompletionHandler:]_block_invoke_3 (in AppKit)
25  0x00007fff8df21d81 -[NSDocumentController(NSInternal) _autoreopenDocumentsIgnoringExpendable:withCompletionHandler:] (in AppKit)
26  0x00007fff8dc11354 -[NSPersistentUIRestorer finishedRestoringWindowsWithZOrder:completionHandler:] (in AppKit)
27  0x00007fff8dac262c -[NSPersistentUIRestorer restoreStateFromRecords:usingDelegate:completionHandler:] (in AppKit)
28  0x00007fff8dac1c91 -[NSPersistentUIManager restoreAllPersistentStateRegisteringAsReadyWhenDone:completionHandler:] (in AppKit)
29  0x00007fff8dac0f37 -[NSApplication _reopenWindowsAsNecessaryIncludingRestorableState:registeringAsReady:completionHandler:] (in AppKit)
30  0x00007fff8dac0c69 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] (in AppKit)
31  0x00007fff8dac06b5 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] (in AppKit)
32  0x00007fff8621a458 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] (in Foundation)
33  0x00007fff8621a2c9 _NSAppleEventManagerGenericHandler (in Foundation)
34  0x00007fff920d499c aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned int, unsigned char*) (in AE)
35  0x00007fff920d4719 dispatchEventAndSendReply(AEDesc const*, AEDesc*) (in AE)
36  0x00007fff920d4623 aeProcessAppleEvent (in AE)
37  0x00007fff8fcdb37e AEProcessAppleEvent (in HIToolbox)
38  0x00007fff8dabcd76 _DPSNextEvent (in AppKit)
39  0x00007fff8dabbe80 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in AppKit)
40  0x00007fff8daafe23 -[NSApplication run] (in AppKit)
41  0x00007fff8da9b2d4 NSApplicationMain (in AppKit)
42  0x0000000109bead17 (in Xcode)
43  0x0000000109beaca8 (in Xcode)

1 个答案:

答案 0 :(得分:0)

看起来自10.10以来没有办法允许工作xcode 4.5和xcode 4.4(虽然OSX 10.9允许解决方法)

所以你应该使用OSX 10.9(Mavericks)来启动它们。

并且......为什么要使用Xcode 4.5?我不知道有什么理由使用它。

Xcode 4.4.1 - 允许在armv6设备上调试的最新版本。

Xcode 4.6.3 - 包含iOS 7设计之前的最后一个SDK(SDK 6.1)。

但是Xcode 4.5.2的原因是什么?