7

After i fixed some conflicts in MainStoryboard.storyboard, Xcode occured build error:

Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/ibtool failed with exit code 255
ibtoold[26299:507] [MT] DVTAssertions: ASSERTION FAILURE in /SourceCache/IDEInterfaceBuilder/IDEInterfaceBuilder-5056/InterfaceBuilderKit/Document/IBObjectContainer.m:363
Details:  The identifier '<IBMemberID: 6mN-WX-Cqa>' is already in use by <IBUITableView: 0x7fc17df3b720>
Object:   <IBObjectContainer: 0x7fc17ac1d920>
Method:   -validatedIdentifier:
Thread:   <NSThread: 0x7fc17ad19b30>{name = (null), num = 1}
Hints: None

I found many similar questions at stackoverflow, but not working for me, includes:

Clean project
Delete Derived Data
Restart Xcode

I want to find exact line which IBMemberID: 6mN-WX-Cqa is in, but seems difficult.

Thanks in advance!

Allen
  • 6,745
  • 5
  • 41
  • 59
  • Allen, did you find a solution for this issue? I'm having a similar issue with my Storyboard after a git merge. (You could open the .storyboard file in a text editor to find the IBMemberID) – Andy Shephard Sep 26 '14 at 02:43
  • @AndyShephard I merged other files except MainStoryboard.storyboard, then redo my stuff based on previous working well version of MainStoryboard.storyboard. Eventually, it works for me. I know this is a little stupid, I want to figure out the real reason for several days, but can't access the compiled source files all the time, I gived up. – Allen Sep 27 '14 at 05:59
  • I actually had to do the same thing in order to make the project compile. Seems like that would be the answer for future reference. – Andy Shephard Sep 28 '14 at 15:16

2 Answers2

19

Xcode:The identifier IBMemberID xxx-xx-xxx is already in use by

Cause of the Problem

I had the same problem. For me it was just after merging from one Git Branch to the Master Branch, and when tried to view the StoryBoard, XCode got stuck and then it quit unexpectedly. Then I searched a bit and then, I got the hint from @Vijayts in the above answer. But hence one step out of it is different.

To Resolve The Problem:

  1. View the StoryBoard relevant to the bug, (some projects may have more than one storyboard) as source code, by right click on it > Open As > Source Code.

  2. Copy the ID out of,
    IBMemberID: 6mN-WX-Cqa
    which is the 6mN-WX-Cqa part.

  3. Search for that ID. For sure it may have been duplicated, most probably in two locations within the StoryBoard Source code. That ID is for an UI Element. May be a button, label or a textfield or even a UIImageView, etc.

  4. Decide out of the duplicated elements, which element to keep and which element is you should delete. You can Identify the elements by their attributes like, x, y, width, height, text, color like things. It's easier if you can identify it at first which has been duplicated with the same IBMemberID but with different attribute values.

  5. These elements you added in the Interface Builder, are now shown as XML elements as it's in source code mode. So be careful to delete the whole unwanted(duplicated) XML element. At first I was also afraid to delete these XML elements. But changing those IDs to be unique was not fit for me.

  6. Then clean the project and try building it. Most probably it will fail to build. That's because of the same kind of error may have occurred but with a new IBMemberID. Repeat the same process until the Build can be done successfully.

After all of these, now I can view the StoryBoard in Interface Builder finely.

So finally hope this answer may save some valuable Earthly Man Hours and hope not it's wasted your time for reading.

Cheers!

Randika Vishman
  • 7,983
  • 3
  • 57
  • 80
6

1) Right click on your Storyboard file in Xcode's project explorer and choose "Open as -> Source code".

2) Search for duplicate identifier ("6mN-WX-Cqa" in your case). There will two or more occurrences of it as the id of your UI elements. (Was a UIButton and a UILabel in my case).

3) Manually change the value of one of these ids to make sure it's unique.

Save and Build your Project.

Vijay Tholpadi
  • 2,135
  • 1
  • 15
  • 20