Reputation: 10129
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.
Upvotes: 131
Views: 76977
Reputation: 7459
If it happens in latest Xcode 10 then try cleaning derived data.
~/Library/Developer/Xcode/DerivedData
Upvotes: 0
Reputation: 2355
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.
Upvotes: 0
Reputation: 438
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
pod init
pod install
Upvotes: 0
Reputation: 281
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.
Upvotes: 2
Reputation: 2943
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.
Upvotes: 18
Reputation: 1808
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
Upvotes: 2
Reputation: 68872
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.
Upvotes: 0
Reputation: 61
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:
...and now it worked... so I'm guessing it was some error in XCode's git-handling???
Upvotes: 0
Reputation: 84
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.
Upvotes: 0
Reputation: 995
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.
Upvotes: 0
Reputation: 36610
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.
Upvotes: 3
Reputation: 2872
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.
Upvotes: 0
Reputation: 790
I was also facing the same issue in Xcode 8. Deleting the Derived data fixed my issue.
Upvotes: 1
Reputation: 31
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.
Upvotes: 2
Reputation: 1189
I'm not sure which part did the magic and yes it killed a lot of time.
Upvotes: 22
Reputation: 2067
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.
Upvotes: 4
Reputation: 9493
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.
Upvotes: 2
Reputation: 1781
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];
}
Upvotes: 0
Reputation: 125
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.
Upvotes: 0
Reputation: 828
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.
Upvotes: 4
Reputation: 1005
I fixed the error with this command, close the simulator and Xcode:
codesign -vv /A*/Xc* | open -ef
Hope that helps.
Upvotes: 0
Reputation: 454
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
Upvotes: 0
Reputation: 6557
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.
Upvotes: 0
Reputation: 1103
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.
Upvotes: 0
Reputation: 2734
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.
Upvotes: 0
Reputation: 563
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:
Upvotes: 2
Reputation: 5178
This happen to us and we clean cache, delete Derived data folder.. etc. nothing happen.
below steps made it fix,
Open As > Source Code
from Xcode
or open it using TextEdit
) appearanceType="aqua"
For more explain use this article, it help us to fix the issue.
Upvotes: 24
Reputation: 8885
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.
Upvotes: 12
Reputation: 6125
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.
Upvotes: 22