Could not find a storyboard named 'MainStoryBoard' in bundle NSBundle

前端 未结 27 2617
感动是毒
感动是毒 2020-12-02 15:41

I have started a new app a few days ago and began working with the simulator to test it. I started as an empty project and manually added the storyboard. The simulator build

27条回答
  •  一向
    一向 (楼主)
    2020-12-02 15:54

    I had this problem in a project that had storyboards with and without ~iPad or ~iPhone suffixes, like MainStoryboard.storyboard and MainStoryboard~iPad.storyboard.

    The problem was that MainStoryboard.storyboard was overwriting MainStoryboard~iPad.storyboard when it got compiled into the build directory. If the files were compiled in the opposite order, both would be preserved without issue. I have no idea why this happens.

    To get around this, you can stop using ~iPad/iPhone suffixes or make sure the files are in the right order in the Copy Bundle Resources phase.

    (Using XCode6.2beta2)

提交回复
热议问题