Why am I getting ibtool failed with exit code 255?

IosXcode

Ios Problem Overview


All of a sudden I can't build my project. I get the following compiler error:

>/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255

I get this error for a whole bunch of my xib files. Any ideas what is happening, and what a solution is?

Using Xcode 4.6, iOS 6.1.

Ios Solutions


Solution 1 - Ios

I had something similar happen to me recently using Xcode 4.6 and iOS 6.1.

All I did was switch to a different device version (5.1) on the simulator and it ran. Switched back to 6.1 and it fixed itself.

Xcode can be unhelpful at times.

Solution 2 - Ios

This happen to us and we clean cache, delete Derived data folder.. etc. nothing happen.

below steps made it fix,

  1. open xib(nib) as Source Code (Right click on the xib Open As > Source Code from Xcode or open it using TextEdit)
  2. remove this appearanceType="aqua"
  3. save and open using Xcode

For more explain use this article, it help us to fix the issue.

Solution 3 - Ios

Try cleaning the app. Cmd-Shft-K.

Solution 4 - Ios

Try to find all XIB files in project and open it. One of them will most likely crash your Xcode.

My problem was custom fonts in some XIB file.

I had to install missing fonts on my computer and problem was solved.

Solution 5 - Ios

  1. Restart Xcode - Didn't Work
  2. Cleaning the App - Didn't Work
  3. Deleting the derivedData - Didn't Work
  4. Reset simulator content and settings - Didn't Work
  5. changing simulator versions - Didn't Work
  6. Restart the OS - Magically Works

I'm not sure which part did the magic and yes it killed a lot of time.

Solution 6 - Ios

In my case, I was working on Visual Studio. It was all good. All of a sudden, I got the same issue. Then I opened XCode, I saw the updates available. Then I Updated the Xcode updates. Then it worked :)

So the reason was : XCode expected to complete some updates. Until that, It was not working properly.

enter image description here

enter image description here

Solution 7 - Ios

What you should do if you're stuck is, in a shell: ibtool --warnings --errors --notices yourfile.xib > alerts.plist

which will crash, but now you have the crashlog, in my case it was an issue with simulated metrics:

> localhost:Classes me$ ibtool --warnings --errors --notices CodeViewController.xib > alerts.plist 2014-04-25 17:40:48.625 ibtoold[11691:507] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilderCocoaTouch/IDEInterfaceBuilderCocoaTouch-5038/InterfaceBuilder/WidgetIntegration/SimulatedMetrics/IBUISimulatedSizeMetrics.m:33 Details: (initialTargetRuntime) should not be nil. Object: Method: -initWithTargetRuntime: Thread: {name = (null), num = 1} Hints: None

So in my case I opened the xib as source via context menu and removed the metrics objects. It depends on the error what to remove or change. Try ibtool again and if it doesn't crash you're good.

Background: The reason for this error is generic, it can always happen with different specs changing from iOS xcode version to version, mostly if you haven't checked your projects periodically with xcode updates.

Solution 8 - Ios

This will be irrelevant for those who had experienced the problem in the past... But with the WatchKit Framework, I had this error come up. All I did was delete a segue which I had linked between two WKInterface Controllers, and the build succeeded.

Solution 9 - Ios

I go this error, and after scanning the crash log I noticed out my Xcode-7 build was trying to use the build tools from Xcode-8 Beta. I had previously used xcode-select to change the version of the build tools I wanted to use. If you have a xcode-beta install, check your settings using the commands below:

Show which build tool path is set:

xcode-select -p

Select the standard Xcode path:

sudo xcode-select -s /Applications/Xcode.app/

If you're trying to build with an Xcode at different installation path, be sure the path above reflects that.

Solution 10 - Ios

Got this just now with XCode 8.3.

For me, I just quit XCode, then cleaned the app and rebuilt. It was fine after that.

The cause for me was adding new string files for a localized storyboard.

Solution 11 - Ios

I just experienced the same thing and none of the other answers here could resolve the issue for me. It turned out to be a duplicate UILabel in the storyboard due to a git merge. Apparently Xcode will crash if two UI elements have the same internal ID.

My method for finding the responsible issue was:

  • Iteratively step backward through the git history, checking out each commit until you find the first storyboard that doesn't crash Xcode.
  • Once you have the commit that started crashing, check out HEAD and iteratively revert the storyboard changes in the problem commit. Continue to narrow it down until you have the one UI element or one line that will cause a crash.
  • Revert the responsible change permanently and restart Xcode. Open the storyboard again and you may be warned about an internal inconsistency. Agree to the proposed changes Xcode makes, but review them.
  • If necessary, you may now attempt to re-create the UI element or changes from scratch that were causing the problem before.

Solution 12 - Ios

I was working within a secondary git branch when I encountered the '255' problem.

I merely switched back to my main git branch, cleaned the project and run. No problems as I had expected.

Then I switched back to the 'problem' git branch and rebuild it with success.

Gremlins.

Solution 13 - Ios

I had something similar happen to me too using Xcode 8.2.1 and iOS 10.2.

I switched to an earlier device version on the simulator and it worked. Then I switched back and it was fixed.

Solution 14 - Ios

I figure out that if you use Xcode for too long without closing it, Xcode will become ultimately unhelpful and giving you random mystery error. so i regularly restart Xcode and all the apps that I`m running on my mac every time a suspicious error appear.

>Xcode Cache
> 1st try check all your segue/outlet/storyboard controller class. sometime storyboard would disconnected with the view controller class that has been set. (this might cause run time error). > > 2nd try cleaning up you project and goto > (~/Library/Developer/Xcode/DerivedData) and delete your project cache. > then Force Close Xcode then restart it. > > 3rd try check all your segue/outlet/storyboard controller class. sometime storyboard would disconnected with the view controller class that has been set. (this might cause run time error). > > 4th try check (copy bundle resource, compile source - Project > Build phase) make sure the file listed is exist with the correct address and folder. sometime creating a group would cause a folder to be create and causing the file cant be found by the compiler > > 5th this also might been cause by moved file + Xcode become ultimately unhelpful and giving you random mystery error. and dint update the (copy bundle resource, compile source - Project > Build phase) after the file has change directory > >Personal Mistake. unintended deleting
> this also might have been cause by calling an deleted ViewController or outlet

Solution 15 - Ios

I have had the same issue using Visual Studio for Mac (Community, 7.4.2 (build 12)) after an OS update (macOS High Sierra 10.13.4).

In this case, it seems that you just need to update Visual Studio and Xcode.

Notice that, of course, Visual Studio doesn't bring Xcode updates, so the "trick" was to open the latter one and let it run the updates.

Solution 16 - Ios

I was also facing the same issue in Xcode 8. Deleting the Derived data fixed my issue.

  1. Go to Folder ~/Library/Developer/Xcode/DerivedData/ and clear the folders within that
  2. Restart Xcode and Simulator and Run Your project....!

Solution 17 - Ios

Just had this happen after doing some work in the storyboard. I did some undoing and it turned out to be a simple UIButton added to a view. Deleted that and it built without error. Just added a new button and it worked.

For a little more explanation... The button had been copied from one TVCell prototype to another. some confusion happened in the copy I guess. Just glad I hadn't change much before trying to build.

Solution 18 - Ios

In my case it happened after renaming some namespaces and I solved the same issue going to the projects properties > APPLICATION tab > Default namespace : giving the new correct namespace.

Of Course I changed the namespace also inside the classes, but this will help because will fix all auto-generated files. Clean and build is recommended and eventually close and reopen the solution.

Solution 19 - Ios

I faced same issue when i merge code form git with other developer code. i tried many time to clean my project. But nothing help me out.

I open storyboard in source code. Start comparing with last working repositories storyboard. Then i found a same label appear two time in same screen. then i remove one of then and save. It helps me.

you can check your xib or storyboard.

Solution 20 - Ios

I had this bug because I rewrote a <view> to <imageView> while editing the storyboard as source code.

I thought this quick-and-dirty solution would work for replacing some custom classes (subclass of UIView) with UIImageViews.


All praise GIT.

Solution 21 - Ios

This is what caused the problem for me: I had attempted to use the iOS 8.0 simulator with Xcode 5.0.2. I had pasted iOS 8.0 simulator in the following path - /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs The result of this was that I was able to see iOS 8.1 simulator visible in the dropdown list in Xcode 5.0.2 but this resulted in compilation error of libtool. I removed the simulator from the path and it worked after i restarted Xcode. Now in order to use iOS 8.0 simulator I am using Xcode 6.1

Solution 22 - Ios

I fixed the error with this command, close the simulator and Xcode:

codesign -vv /A*/Xc* | open -ef

Hope that helps.

Solution 23 - Ios

I was getting this error when building for 10.9 an .XIB that was created in XCode 6.4 (10.10).

See this answer. The XIB was calling for 'labelColor' which was introduced in 10.10, and was unknown to 10.9.

Opening the XIB as source kept it from crashing XCode, and permitted me to change instances of 'labelColor' to 'textColor' and the error was resolved.

Solution 24 - Ios

As Logan Geefs mentions above, it appears to be caused by Interface Controller segues (i.e. loops). Deleting the "bad" segues doesn't really solve the navigation problem. What is needed is to place some button actions to [pop controllers] strategically.

Here's the code that worked for me:

 - (IBAction)backToStart {

   [self popToRootController];
 }

 - (IBAction)backToPrevious {

   [self popController];
 }

Solution 25 - Ios

Few have mentioned that the problem was related to segues, mine was too, although it did not pop up immediately after i added the new segue and i was able to run the app a few times make some changes, add new views before it occurred, so don't disregard this. I went deleting some of the controllers and undoing in case it didn't help. If a segue is the issue you may build but you wont be able to add that segue, so re-create the entire view controller if it's a viable option. Copying and pasting didn't seem to work, though i did not try removing the IBOutlet connections.

Solution 26 - Ios

This started to happen to me when I installed and started using XCode 9 betas. When I started modifying good projects in 8.3, the storyboards got corrupted with this error and XCode crashed. I had XCode 7.x, 8.3 and 9 installed on my computer. I uninstalled all of them (and removed all related files) and then reinstalled 8.3 from the App Store. My project storyboards were still corrupted, but I was able to recover from backup and now things are just fine as I proceed.
Not sure if this is 9 beta related or not.

Solution 27 - Ios

In my case, I had this issue after I manually resolved a merge conflict in the "project.pbxproj" file. In XCode, select project->target->BuildPhases->CopyBundleResources. There I removed some duplicate files that were showing up in blank icons (unlike the XIB file icons). AFter this, the build went well without issues.

Solution 28 - Ios

I got this error today on a new project, testing iOS' ARKit via the "Augmented Reality App" project template.

After moving some .scn files from the root project into the art.scnassets folder, I started getting the code-sign error, and nothing I did was able to resolve it.

I tried all the suggestions in this thread (clean, clean derived data, restart Xcode, restart the Mac, look in the storyboard files for duplicate IDs)... but what made it work for me, was to:

  • commit and push my changes to my git project
  • hard-reset to the previous commit
  • clean derived data, and run successfully
  • hard-reset back to the most recent commit

...and now it worked... so I'm guessing it was some error in XCode's git-handling???

Solution 29 - Ios

On XCODE 9 one cause of this is a bug in XCODE 9.1 with old .XIB files.

Fix:

  1. Upgrade to XCODE 9.2

  2. All your .XIB files should be set to iOS 8.1 version or higher.

Solution 30 - Ios

Just clean build your project. you'll get Solved!

Solution 31 - Ios

If nothing helped you from this answers and you are using pods and maybe you open same project in different Xcode versions you have to

  1. Go to root folder of your project.
  2. Copy and save somewhere data from Podfile.
  3. Delete 4 files and folders - Podfile, Podfile.lock, Pods(folder), your_workspase_name.xcodeproject
  4. Open terminal and navigate to root folder.
  5. run command pod init
  6. open Podfile and paste saved data from previous Podfile
  7. run command pod install
  8. open your workspase and your problems will be gone.

Solution 32 - Ios

I use xCode 9.4 and I had this error. I tried restart xCode, cleaning the app, and deleting the derived data,

> I restarted my mac

and its work like a charm.

Solution 33 - Ios

If it happens in latest Xcode 10 then try cleaning derived data.

> ~/Library/Developer/Xcode/DerivedData

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDarrenView Question on Stackoverflow
Solution 1 - IosJay Q.View Answer on Stackoverflow
Solution 2 - IosdamithHView Answer on Stackoverflow
Solution 3 - IosUndoView Answer on Stackoverflow
Solution 4 - IosknagodeView Answer on Stackoverflow
Solution 5 - IosVikram BeldeView Answer on Stackoverflow
Solution 6 - IosNirmal SubediView Answer on Stackoverflow
Solution 7 - Ios0llieView Answer on Stackoverflow
Solution 8 - IosLoganView Answer on Stackoverflow
Solution 9 - IosnenchevView Answer on Stackoverflow
Solution 10 - IosCodeBenderView Answer on Stackoverflow
Solution 11 - IosAWrightIVView Answer on Stackoverflow
Solution 12 - IosFrederick C. LeeView Answer on Stackoverflow
Solution 13 - IosKazakView Answer on Stackoverflow
Solution 14 - IosMuhammad AsyrafView Answer on Stackoverflow
Solution 15 - IosAlessio Di SalvoView Answer on Stackoverflow
Solution 16 - IosAbirami BalaView Answer on Stackoverflow
Solution 17 - IosWCByrneView Answer on Stackoverflow
Solution 18 - IosDaniele D.View Answer on Stackoverflow
Solution 19 - IosAnand MishraView Answer on Stackoverflow
Solution 20 - IosLord ZsoltView Answer on Stackoverflow
Solution 21 - IosGhostCodeView Answer on Stackoverflow
Solution 22 - IosPedro.AlonsoView Answer on Stackoverflow
Solution 23 - IosjtfView Answer on Stackoverflow
Solution 24 - IosJim RotaView Answer on Stackoverflow
Solution 25 - IosSam BingView Answer on Stackoverflow
Solution 26 - IosStewart LynchView Answer on Stackoverflow
Solution 27 - IosKabeerView Answer on Stackoverflow
Solution 28 - IosTim KofoedView Answer on Stackoverflow
Solution 29 - IosWarren PView Answer on Stackoverflow
Solution 30 - IosSunil TargeView Answer on Stackoverflow
Solution 31 - IosArsen SenchView Answer on Stackoverflow
Solution 32 - IosAhmed AbdallahView Answer on Stackoverflow
Solution 33 - IosSunil TargeView Answer on Stackoverflow