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

6

2

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 simulator crashing too

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

Meritocracy answered 2/2, 2012 at 9:4 Comment(5)
have you removed anything from the en.lproj folder .. Error is due to change in the location of xib or en.lproj folderConference
is your XCode installed successfully. To test it create new sample HelloWorld app and test it. If it works means XCode is good. Then create a empty project and add your existing source file and check if it works.Pennant
Ali3n, I haven't removed anything. This happens with new projects I create, or old ones that were working before.Meritocracy
UPT, Xcode is installed successfully. This happens for new and old projects. The only thing I've done recently is install Appcelerator Titanium. Maybe that install stuffed up Xcode?Meritocracy
@Meritocracy Did you try installing XCode to a different folder than the default? It can reduce the chance of any bad leftovers getting in the way.Sniffy
S
6

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). enter image description here

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
Simard answered 10/2, 2012 at 9:34 Comment(1)
Yes!! That was it! I can't believe that was the problem. Asepsis doesn't even come with the latest version of TotalFinder so it must have been installed from an old version still. Thankyou very much!Meritocracy
V
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

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

Visitation answered 2/2, 2012 at 22:47 Comment(4)
Thanks for this! Now the build succeeds with projects using .xib files. But still fails on projects with .storyboard files. Also, the iPhone simulator still crashes when running. It's a step in the right direction though!Meritocracy
Can you update your question with the new error code? Are you testing 2 different projects? (one with xib files and a separate one with storyboard.)Visitation
Yes I am using two different projects to test, one with .storyboard one with .xib. I'll updated this now too.Meritocracy
Actually after further testing the project only compile sometimes and clicking on .xib files still crashes xcode :(Meritocracy
M
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.)

Milzie answered 2/2, 2012 at 11:59 Comment(1)
Thanks Stephen, I have done this. I did this too... unbelievable but the same thing is still happening. Although it didn't seem to completely remove xcode as the newly installed version still knew about all my previous projects? Maybe I'll try yet again...Meritocracy
T
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.

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.

Thylacine answered 5/2, 2012 at 23:6 Comment(2)
Thanks Jeshua, yep I starting to think that it's my system that is no too healthy too. I've created another user on this system and run xcode on a clean user account and the same problem is still there too. If I can't figure this out soon I probably will do a clean system install. My computer probably needs it anyway.Meritocracy
I almost suggested creating a test user, but since the problem still persists after deleting DerivedData I figured that wasn't going to help.Thylacine
P
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.

Paresh answered 8/2, 2012 at 5:33 Comment(1)
Tried this, but unfortunately didn't work. Didn't think it would as I've tried creating a fresh user on my system and the problem was still there so it's a system problem. As soon as I get a few days free I'll re-install the operating system and start fresh.Meritocracy
P
0

enter image description here

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.

Pompom answered 5/10, 2012 at 2:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.