Micro.blog
IBUIScreenMetrics

Fix for IBUIScreenMetrics could not be decoded

Articles Comments (1)

I ran into a strange Interface Builder issue, while trying a build of our legacy app in Xcode 7. I had to debug an unrelated issue that had appeared on our apps for users running on iOS 9 devices. I created a branch named “Xcode7”, as you do, and opened my project in Xcode 7. Among the build warning were some “angry red” errors that said the XIB ” could not be opened. An instance of IBUIScreenMetrics could not be decoded for an element ‘object’.”

I could find no recent solution on Stack Overflow so I’m posting my own. Strangely my issue was with CollectionView objects for iPad XIBs.

Hopefully you still have access to Xcode 6. Open the project in Xcode 6, and in the Project Navigator select your XIB. Click on Identity and Type and change the Interface Builder Document to Opens in: Default (6.2). While you’re there you change the Builds For setting as well. It’s the Opens in that was causing my issue.

I happened to have the project open in Xcode 7 beta at the same time. As soon as I made the change, the file could be opened in Xcode 7. I did a Build & Run and all is well with the world.

Before

After

I hope this helps you as well.

 

Pin It

» Articles » Fix for IBUIScreenMetrics could not...
On September 19, 2015
By
,

One Response to Fix for IBUIScreenMetrics could not be decoded

  1. Tuttu jose says:

    Do the above,other ways try this.

    just uncheck auto Layout and build

    or

    may be some times that Interface Builder will be disabled then try the following

    1 : select *xib file

    2 : open as source code

    3 : find “IBUIScreenMetrics” from source code

    4: just comment that line

    5:Then build it.

Leave a Reply

« »