iPhone needs cleaning targets before recompile
Everytime I do "Build & Go" the app to my device, It installs the app with a white icon, shows a black screen and "Failed to load NSMainNibFile MainWindow" in the debugger.
However after cleaning, and then recompiling it works fine. Is this 开发者_运维技巧normal? How do I go about this?
It is not normal.
For some reason your main nib file where your app icon and MainWindow nib are located is either not being created or is corrupted. Presumably this happens during a subsequent build after at least one successful build has been performed following a clean all.
Troubleshooting suggestions:
- You should post the exact sequence of builds that triggers the problem. Preferably in a list format so its easy to read.
- Check for any unusual resources like images, sounds etc that you may have added. Perhaps something in an usual format is trigging the problem.
- Check your target before each compile to confirm that that the MainWindow nib shows up in the resources phase.
- Copy your source files and resources to a new project. Sometimes projects get corrupted and when they do, they cannot be repaired.
- Check for any resource file names that have unusual characters in them. IIRC, file names with multiple dots can cause problems e.g. my.file.name.jpg.
精彩评论