IBTool Error: The operation couldn’t be completed.


Fixed in Xcode 6.1.1

Apple fixed this ibtool bug in Xcode 6.1.1, so upgrading to Xcode 6.1.1 or higher is the easiest fix.


Description of the problem

The ibtool command in Xcode 6.0 had a bug on OS X 10.10 Yosemite. Xamarin.iOS uses Xcode's ibtool to compile storyboards and XIB files.

More information about the bug in relation to Xcode can be found on the following Stack Overflow post: http://stackoverflow.com/questions/25754763/cant-open-storyboard

Error message

The document "MainStoryboard.storyboard" could not be opened. The operation couldn’t be completed. (com.apple.InterfaceBuilder error -1.)

Workarounds (for Xcode 6.0)

Option 1: Manage all UIImageView.Image properties in code

Rather than setting the Image property of a UIImageView in the storyboard or .xib file, you can set the property in one of the view life cycle override methods in the view controller (for example, in ViewDidLoad()). See also http://developer.xamarin.com/guides/ios/application_fundamentals/working_with_images/ for tips about using UIImage.FromBundle() vs. UIImage.FromFile().

Option 2: Move all of the image resources to the top-level Resources folder

After moving the images to the top-level Resources folder, you will need to update the storyboard and .xib files to use the new image paths.

Option 3: Set the LogicalName for any problematic image assets so they are copied to the top level of the.app bundle

For example, say your original .csproj file contains the following entry:

<BundleResource Include="Resources\Images\image.png" />

You can change this element and add a LogicalName so that the image will instead be copied to the top level of the .app bundle:

<BundleResource Include="Resources\Images\image.png">
    <LogicalName>image.png</LogicalName>
</BundleResource>

In Xamarin Studio the LogicalName can also be set using the "Resource ID" field for the image under "View -> Pads -> Properties". (See also: http://stackoverflow.com/questions/16938250/xamarin-studio-folder-structure-issue-in-ios-project/16951545#16951545)

After this change, you will need to update the storyboard and .xib files to use the new top-level image paths. Xamarin Studio will automatically update the list of autocompletions for the "Image" property in the iOS Designer. In Visual Studio, you'll need to edit the path by hand. The iOS Designer will then display this as a missing image, but the project will build and run correctly.

If you have any questions or concerns, please contact Support through the email address available within your customer portal.

Thank you. 

Last Updated: Oct 21, 2016 06:10PM EDT