0

I'm trying to run my app after running an Xcode clean and clean build folder and I'm now getting this error and a crash:

fyi: there was a file called DetailViewController that I deleted because I didn't need it anymore. It's only after running a clean and clean build folder that this crash has been occurring.

 Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/username/Library/Application Support/iPhone Simulator/6.1/Applications/4E0DB510-4107-4F8D-A08C-ECFDDB1DB506/1000 appname.app> (loaded)' with name 'DetailViewController'

I tried deleting the contents of /Users/username/Library/Application Support/iPhone Simulator/6.1/Applications/ to remove the apps on the simulator.

I also reset the Simulator. Closed and re-ran the program but still getting that error.

thanks for any help

4

1 回答 1

2

首先,即使使用“清理构建文件夹”,某些文件也会被缓存,尤其是对于模拟器。项目中已删除的文件(尤其是派生的 nib 和图像)可以保留。

  • Command-Option-Shift-K 清除构建文件夹。
  • 退出 Xcode 并手动清理 ~/Library/Developer/Xcode/DerivedData。
  • 在模拟器中,选择 iOS Simulator > Reset Content and Settings。

现在如果它失败了,那是因为你的代码只是因为过度缓存的构建文件而工作。如果是这种情况,请检查您的 rootViewController 指向的位置。

于 2013-08-09T20:19:39.133 回答