简体   繁体   中英

xcode won't compile iOS apps, crashes when .xib or .storyboard files are opened

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

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.

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.

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

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?! :(

ios模拟器也崩溃

----- UPDATE 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.

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

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

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

did you installed TotalFinder ?

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

Asepsis current Version (1.1) Conflicts with Xcode 4.2 and Glims (see image). 在此输入图像描述

The Website lists this known issue:

Xcode 4.2, iOS 5.0 Simulator

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

to uninstall just run this command from Terminal:

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

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

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

在此输入图像描述

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.

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

Then run Xcode again, everything goes ok again! thanks 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.

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.)

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

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

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM