I've updated my Xcode project (created a new project and copied the source files over to the new o开发者_StackOverflowne) such that the AppDelegate now has a new name. I noticed if I build this new version over the old one on my iPhone I get the following error Unknown class OLD APP DELEGATE NAME in Interface Builder file
. However when I delete the app from my iPhone and reinstall a fresh copy everything works fine. Does this mean that users who install my update will crash and will have to delete the app losing all their data, or is there a way to avoid this?
When you rename your UIApplicationDelegate subclass, you must be sure to also update it in the main nib file (the one named by NSMainNibFile
key in your Info.plist). This is usually MainWindow.xib
and/or MainWindow-iPad.xib
.
精彩评论