Search code examples
iosxcodestoryboardibtool

ibtool error when linking storyboard references: The file "Info.plist" couldn't be saved in the folder *.storyboardc


I'm using Xcode 7.0 beta 4, and recently split my single Main.storyboard into a series of storyboards connected by storyboard references (newly available in Xcode 7).

When building, I receive the following "Interface Builder Storyboard Linker Error":

/* com.apple.ibtool.errors */
: error: The file “Info.plist” couldn’t be saved in the folder “Pages.storyboardc”.
    Underlying Errors:
        Description: The operation couldn’t be completed. Not a directory
        Failure Reason: Not a directory

How can I make sense of this error?


The storyboard references were created by selecting the scenes in the original storyboard and choosing Editor > Refactor to Storyboard.... A previous issue I encountered was that the storyboard linker was throwing a different type of error:

/* com.apple.ibtool.errors */
: error: Deploying Storyboard References to iOS 8.0 requires that your storyboards do not
         share any view controller identifiers. Browser.storyboard and Pages.storyboard
         both contain a view controller with identifier "PagesViewController".

It turned out that using the "Refactor to Storyboard..." command had automatically assigned a Storyboard ID to the storyboard references based on one of the refactored view controller identifiers. This resulted in the situation described by the error (a storyboard reference with the same identifier as a view controller scene's identifier). I removed these identifiers, as I figure you don't need to refer to a storyboard reference from code.


Update:

I have also seen this problem manifest itself as a slightly different error:

/* com.apple.ibtool.errors */
: error: “<StoryboardReferenceID>.nib” couldn’t be removed.
    Underlying Errors:
        Description: The operation couldn’t be completed. Not a directory
        Failure Reason: Not a directory

Solution

  • I found a way to get rid of the error while writing this question. I can't say I'm any the wiser as to what it means, however, so any additional insight would be welcome.

    I re-added the storyboard IDs I had removed to avoid the previous error relating to view controllers sharing the same identifier, but made sure no two were the same. The error no longer shows.

    I don't know what the implications of a storyboard identifier are for a storyboard reference, but it seems that the linker would prefer them to have one! I would have expected a compiler warning/error instead of a linker error if an identifier is required (like when a scene is inaccessible due to a lack of identifier), so I'm currently thinking this is a linker bug that might be ironed out by the final release of Xcode 7.