xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

时间:2021-05-28 16:25:25

I'm running the very latest version of xcode (4.2.1). And I'm signed up to the ios developer program.

我正在运行最新版本的xcode(4.2.1)。我注册了ios开发程序。

When I create a new iOS Application for iPhone or iPad, using storyboards or not it doesn't seem to matter, xcode crashes on me when I try to open the .xib or .storyboard files.

当我为iPhone或iPad创建一个新的iOS应用程序时,无论是否使用故事板,这似乎都无关紧要,当我试图打开.xib或.storyboard文件时,xcode就会崩溃。

Here is the error provided when I click on the storyboard file before it crashes.

这是我在故事板文件崩溃前单击时提供的错误。

ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-933/IB Plugin/Utilities/IBObjectMarshalling.m:179
Details:  Interface Builder encountered an error communicating with the iOS Simulator. "Interface Builder Cocoa Touch Tool" (54332) failed to launch and exited with status (null), signal 10. Please check Console.app for crash reports for "Interface Builder Cocoa Touch Tool" for further information.
Function: NSDistantObject<IBCocoaTouchToolProtocol> *IBAttachToCocoaTouchTool(IBCocoaTouchTargetRuntime *)
Thread:   <NSThread: 0x40010a260>{name = (null), num = 1}

Something to do with the iOS simulator? Exactly the same message appears when I try open an .xib file.

和iOS模拟器有关吗?当我尝试打开一个.xib文件时,会出现完全相同的消息。

When I try to run or test a project I get an error when it tries to compile the storyboard or xib files. eg

当我试图运行或测试一个项目时,当它试图编译故事板或xib文件时,我就会得到一个错误。如

CompileXIB EmptyViewTest/en.lproj/com_markstewart_comViewController.xib
    cd /Users/mark/Sites/_iOS/EmptyViewTest/EmptyViewTest
    setenv IBC_MINIMUM_COMPATIBILITY_VERSION 5.0
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
    setenv XCODE_DEVELOPER_USR_PATH /Developer/usr/bin/..
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/mark/Library/Developer/Xcode/DerivedData/EmptyViewTest-dxxqhrayajehooezj flgyjqysqkp/Build/Products/Debug-iphonesimulator/EmptyViewTest.app/en.lproj/com_ markstewart_comViewController.nib /Users/mark/Sites/_iOS/EmptyViewTest/EmptyViewTest/EmptyViewTest/en.lproj/com_m arkstewart_comViewController.xib --sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0 .sdk

Please help! How do I get this to work again?

请帮助!我怎么才能让它再工作呢?


I've since totally uninstalled and re-installed developer tools. Same problem still occurs. It seems to be something to do with the iphone simulator as when I try to run the simulator app by itself it instantly crashes too. (see attached screenshot). What is going on?! :(

我已经完全卸载并重新安装了开发人员工具。同样的问题仍然发生。这似乎与iphone模拟器有关,当我试图运行模拟器应用程序时,它也会立即崩溃。(见附件截图)。什么是怎么回事? !:(

xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

----- UPDATE 2

——更新2

Still having this problem! I can sometimes build applications, but as soon as I click on either the .xib or .storyboard file (in separate projects) xcode crashes. When they do succeed I get the error above that the simulator has issues locating the SDK.

仍然有这个问题!我有时可以构建应用程序,但只要单击.xib或. storyboardfile(在单独的项目中),xcode就会崩溃。当它们成功时,我得到了上面的错误,即模拟器在查找SDK时出现了问题。

I've uninstalled and reinstalled xcode about five times now and the same issues keeps occurring.

我已经卸载和重新安装xcode 5次了,同样的问题还在继续。

Here is the crash report from the "Interface Builder Cocoa Touch Tool" error. If it makes sense to anyone? Crash Report

这是来自“接口构建器Cocoa Touch工具”错误的崩溃报告。如果这对任何人都有意义?事故报告

Does anyone have any other ideas? Starting to get pretty desperate.

有人有其他想法吗?开始变得非常绝望。

6 个解决方案

#1


6  

did you installed TotalFinder?

你安装TotalFinder吗?

I had the same problem caused by TotalFinder's Asepsis feature.

TotalFinder的无菌功能也给我带来了同样的问题。

Asepsis current Version (1.1) Conflicts with Xcode 4.2 and Glims (see image). xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

Asepsis当前版本(1.1)与Xcode 4.2和Glims存在冲突(见图)。

The Website lists this known issue:

该网站列出了这个已知的问题:

Xcode 4.2, iOS 5.0 Simulator

Xcode 4.2, iOS 5.0模拟器

Some developers reported that Asepsis breaks iOS 5.0 Simulator and causes Xcode 4.2 fail in loading XIB files

一些开发人员报告说,Asepsis破坏了iOS 5.0模拟器,导致Xcode 4.2加载XIB文件失败

to uninstall just run this command from Terminal:

要卸载,请从终端运行此命令:

sudo open /System/Library/Extensions/Asepsis.kext/Contents/Resources/Asepsis\ Uninstaller.app

#2


1  

I had this same problem and deleting everything in your "Derived Data" folder fixed my issues. In your case: /Users/mark/Library/Developer/Xcode/DerivedData/EmptyViewTest

我也有同样的问题,在你的“导出数据”文件夹中删除了所有问题。在你的情况中:/用户/标志/图书馆/开发/ Xcode / DerivedData / EmptyViewTest

Maybe this thread will help: How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?

这个线程可能会有所帮助:如何在~/Library/Developer/Xcode/DerivedData目录中安全地删除?

#3


0  

It's a pretty fundamental problem and so unlikely it's anything you're doing wrong. I'd suggest reinstalling Xcode. If that doesn't work, try uninstalling it first and install it again. (Bit of a pain, sorry. Stock up on coffee first.)

这是一个非常基本的问题,所以不太可能是你做错了什么。我建议重新安装Xcode。如果这不起作用,请尝试先卸载它,然后再安装它。(有点痛,抱歉。先储备咖啡)

#4


0  

I hate to say it, but it sounds like you may need to do a clean system install followed by a clean XCode install.

我不想这么说,但听起来您可能需要进行一个干净的系统安装,然后进行一个干净的XCode安装。

Or do you have another machine you can try a clean install of XCode on first?

或者你有另一台机器,你可以先尝试一个干净的XCode安装?

If you can't just create a new project and run it in the simulator without it crashing you either have an issue with XCode or with your system. Since reinstalling XCode you still have an issue, I am afraid that leaves your system in question.

如果你不能只创建一个新项目并在模拟器中运行它而不使它崩溃,那么你要么在XCode上有问题,要么在系统上有问题。由于重新安装XCode仍然存在问题,我担心这会使您的系统受到质疑。

#5


0  

Try removing (you can try just moving them rather than deleting them) these user directories. Make sure your developer tools are not running when you do this.

尝试删除(您可以尝试移动它们而不是删除它们)这些用户目录。当您这样做时,请确保您的开发工具没有运行。

~/Library/Application\ Support/iPhone\ Simulator
~/Library/Application\ Support/Developer
~/Library/Developer

These directories are particular to your user.

这些目录是您的用户特有的。

#6


0  

xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

I have same problem within xcode4.5 and iOS6. When I startup iOS simulator 6, it always report "The simulated application quit" and ask me to switch SDKS. Whatever I choose the right location of SDK5.0 or SDK6.0 for the simulator, the problem is still here. So I can't run even a simplest program with SDK6.0, but the old projects with SDK5.0 are ok.

我在xcode4.5和iOS6中也有同样的问题。当我启动iOS模拟器6时,它总是报告“模拟应用退出”,并要求我切换SDKS。无论我为模拟器选择SDK5.0或SDK6.0的正确位置,问题仍然存在。因此,即使使用SDK6.0我也不能运行最简单的程序,但是使用SDK5.0的旧项目是可以的。

I don't why, because it works well before today. So I follow @quellish's way, close xcode and simulator, remove these directory in my finder: ~/Library/Application\ Support/iPhone\ Simulator ~/Library/Application\ Support/Developer ~/Library/Developer

我不知道为什么,因为它在今天之前很好用。所以我按照@quellish的方式,关闭xcode和模拟器,在我的查找器中删除这些目录:~/Library/Application\ Support/iPhone\模拟器~/Library/Application\ Support/Developer /Library/Developer

Then run Xcode again, everything goes ok again! thanks quellish!

然后再运行Xcode,一切又恢复正常了!谢谢quellish !

I think some files in these directory was broken, so the strange problem happened. If someone know exactly why it happened, it's appreciate you can tell me.

我想这个目录中的一些文件坏了,所以奇怪的问题发生了。如果有人知道为什么会发生这样的事,很感谢你能告诉我。

#1


6  

did you installed TotalFinder?

你安装TotalFinder吗?

I had the same problem caused by TotalFinder's Asepsis feature.

TotalFinder的无菌功能也给我带来了同样的问题。

Asepsis current Version (1.1) Conflicts with Xcode 4.2 and Glims (see image). xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

Asepsis当前版本(1.1)与Xcode 4.2和Glims存在冲突(见图)。

The Website lists this known issue:

该网站列出了这个已知的问题:

Xcode 4.2, iOS 5.0 Simulator

Xcode 4.2, iOS 5.0模拟器

Some developers reported that Asepsis breaks iOS 5.0 Simulator and causes Xcode 4.2 fail in loading XIB files

一些开发人员报告说,Asepsis破坏了iOS 5.0模拟器,导致Xcode 4.2加载XIB文件失败

to uninstall just run this command from Terminal:

要卸载,请从终端运行此命令:

sudo open /System/Library/Extensions/Asepsis.kext/Contents/Resources/Asepsis\ Uninstaller.app

#2


1  

I had this same problem and deleting everything in your "Derived Data" folder fixed my issues. In your case: /Users/mark/Library/Developer/Xcode/DerivedData/EmptyViewTest

我也有同样的问题,在你的“导出数据”文件夹中删除了所有问题。在你的情况中:/用户/标志/图书馆/开发/ Xcode / DerivedData / EmptyViewTest

Maybe this thread will help: How can I safely delete in my ~/Library/Developer/Xcode/DerivedData directory?

这个线程可能会有所帮助:如何在~/Library/Developer/Xcode/DerivedData目录中安全地删除?

#3


0  

It's a pretty fundamental problem and so unlikely it's anything you're doing wrong. I'd suggest reinstalling Xcode. If that doesn't work, try uninstalling it first and install it again. (Bit of a pain, sorry. Stock up on coffee first.)

这是一个非常基本的问题,所以不太可能是你做错了什么。我建议重新安装Xcode。如果这不起作用,请尝试先卸载它,然后再安装它。(有点痛,抱歉。先储备咖啡)

#4


0  

I hate to say it, but it sounds like you may need to do a clean system install followed by a clean XCode install.

我不想这么说,但听起来您可能需要进行一个干净的系统安装,然后进行一个干净的XCode安装。

Or do you have another machine you can try a clean install of XCode on first?

或者你有另一台机器,你可以先尝试一个干净的XCode安装?

If you can't just create a new project and run it in the simulator without it crashing you either have an issue with XCode or with your system. Since reinstalling XCode you still have an issue, I am afraid that leaves your system in question.

如果你不能只创建一个新项目并在模拟器中运行它而不使它崩溃,那么你要么在XCode上有问题,要么在系统上有问题。由于重新安装XCode仍然存在问题,我担心这会使您的系统受到质疑。

#5


0  

Try removing (you can try just moving them rather than deleting them) these user directories. Make sure your developer tools are not running when you do this.

尝试删除(您可以尝试移动它们而不是删除它们)这些用户目录。当您这样做时,请确保您的开发工具没有运行。

~/Library/Application\ Support/iPhone\ Simulator
~/Library/Application\ Support/Developer
~/Library/Developer

These directories are particular to your user.

这些目录是您的用户特有的。

#6


0  

xcode不会编译iOS应用程序,当.xib或.storyboard文件被打开时,会崩溃

I have same problem within xcode4.5 and iOS6. When I startup iOS simulator 6, it always report "The simulated application quit" and ask me to switch SDKS. Whatever I choose the right location of SDK5.0 or SDK6.0 for the simulator, the problem is still here. So I can't run even a simplest program with SDK6.0, but the old projects with SDK5.0 are ok.

我在xcode4.5和iOS6中也有同样的问题。当我启动iOS模拟器6时,它总是报告“模拟应用退出”,并要求我切换SDKS。无论我为模拟器选择SDK5.0或SDK6.0的正确位置,问题仍然存在。因此,即使使用SDK6.0我也不能运行最简单的程序,但是使用SDK5.0的旧项目是可以的。

I don't why, because it works well before today. So I follow @quellish's way, close xcode and simulator, remove these directory in my finder: ~/Library/Application\ Support/iPhone\ Simulator ~/Library/Application\ Support/Developer ~/Library/Developer

我不知道为什么,因为它在今天之前很好用。所以我按照@quellish的方式,关闭xcode和模拟器,在我的查找器中删除这些目录:~/Library/Application\ Support/iPhone\模拟器~/Library/Application\ Support/Developer /Library/Developer

Then run Xcode again, everything goes ok again! thanks quellish!

然后再运行Xcode,一切又恢复正常了!谢谢quellish !

I think some files in these directory was broken, so the strange problem happened. If someone know exactly why it happened, it's appreciate you can tell me.

我想这个目录中的一些文件坏了,所以奇怪的问题发生了。如果有人知道为什么会发生这样的事,很感谢你能告诉我。