XCode 4.2 MainStoryBoard Not Found

后端 未结 5 1759
梦毁少年i
梦毁少年i 2020-12-09 13:00

When I make changes to the MainStoryboard.storyboard none of these changes make it to my iOS device even though it builds. I tried deleting all data for the application from

相关标签:
5条回答
  • 2020-12-09 13:08

    I have universal app, so with one storyboard for iPhone and another one for iPad, iPad simulator works, but when i try to lunch iPhone simulator i obtain this error:

    Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'MainStoryboard' in bundle NSBundle </var/mobile/Applications/BE0CBEE9-1E95-443A-97CF-53CCD66A2D0C/WalkBack.app> (loaded)'
    

    I tried all your solutions but anyone didn't work. I always had same error. I solved removing localization parameter on iPhone storyboard and setting for both storyboard the same localization.

    I hope that helps you!

    0 讨论(0)
  • 2020-12-09 13:15

    Actually, to be even more precise, you will find that you are unable to add MainStoryboard.storyboard [it does not show up in the file browser] to the "Copy Bundle Resources" section of the Build Phase setting. I found that I actually had to add it the "Compile Sources" section of the Build Phase setting. It then adds it to both sections. I am not sure whether this is the intended behaviour or a bug in Xcode 4.6.3.

    0 讨论(0)
  • 2020-12-09 13:28

    I've seen this happen a handful of times with the files with my students, and today I had it happen to me as well. What seems to fix it for me:

    1. Right-click on your MainStoryboard.storyboard in the Project Navigator.
    2. Select Delete and click Remove References Only.
    3. Right click on InfoPlist.strings and select "Show In Finder". (This is just my lazy way to open the folder containing the storyboard in finder.)
    4. Drag the MainStoryboard.storyboard from Finder back into the project.

    My suspicion is that there is a bug somewhere triggered by adding files to the project or certain edits to the storyboard. It causes the localized files to not be copied into the bundle (I think). Removing the storyboard and re-adding it to the project seems to fix the hiccup.

    0 讨论(0)
  • 2020-12-09 13:28

    There is another way!

    Go to your project, select your target and click on Build Phases. Then unfold "Copy Bundle Resources" and add the MainStoryboard.storyboard to the resources. You can do this by clicking on the little '+' sign on the bottom of the unfolded list.

    You don't have to delete the file from your project just re-add it to the resources.

    0 讨论(0)
  • 2020-12-09 13:28

    You could always also reset the simulator.

    0 讨论(0)
提交回复
热议问题