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.
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.
This happen to us and we clean cache, delete Derived data folder.. etc. nothing happen.
below steps made it fix,
open xib(nib) as Source Code (Right click on the xib Open As > Source Code from Xcode or open it using TextEdit) remove this appearanceType="aqua" save and open using Xcode
For more explain use this article, it help us to fix the issue.
Try cleaning the app. Cmd-Shft-K.
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.
Restart Xcode - Didn't Work Cleaning the App - Didn't Work Deleting the derivedData - Didn't Work Reset simulator content and settings - Didn't Work changing simulator versions - Didn't Work Restart the OS - Magically Works
I'm not sure which part did the magic and yes it killed a lot of time.
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.
https://i.stack.imgur.com/ieSVA.png
https://i.stack.imgur.com/JFPxW.png
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.
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.
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.
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.
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.
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.
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.
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
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.
I was also facing the same issue in Xcode 8. Deleting the Derived data fixed my issue.
Go to Folder ~/Library/Developer/Xcode/DerivedData/ and clear the folders within that Restart Xcode and Simulator and Run Your project....!
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.
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.
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.
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 UIImageView
s.
All praise GIT.
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
I fixed the error with this command, close the simulator and Xcode:
codesign -vv /A*/Xc* | open -ef
Hope that helps.
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.
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];
}
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.
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.
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.
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???
On XCODE 9 one cause of this is a bug in XCODE 9.1 with old .XIB files.
Fix:
Upgrade to XCODE 9.2 All your .XIB files should be set to iOS 8.1 version or higher.
Just clean build your project. you'll get Solved!
Success story sharing