简体   繁体   中英

Xcode 4.3 stopped building XIB files

I have a several XIB files in my iOS project for various custom table cells. I've just added another, but for some reason Xcode will not build this (or any subsequent) XIBs into the project !

The appropriate flags are set in the files inspector to include the XIB, and the XIB appears in the correct build phase. All XIBs were working as expected up until this point, and no settings have been altered in the project

项目设置

I've experimented with adding more XIBs with different names, but none of them are getting built into the project (verified by inspecting the build application's NIB files).

看妈妈,没有NIB!

What is going on ? Is this a bug in Xcode ? Anybody know how to resolve it ?

Update

I deleted the derived data directory, and lo and behold the NIB is now appearing in the build product - so I'll chalk this one up as a mysterious Xcode bug.

I know this is creating more classes and extra files AND it doesnt solve why this is happening but as a workaround you could try:

Creating a BlahCell class and set the nibs file's owner to it - if BlahCell.m is set to compile this may get your nib compiled.

I take it in other news a straight clean and build doesn't fix anything?

In the current version of Xcode, when things get weird and quitting+relaunching doesn't solve it, deleting your DerivedData folder usually will.

You can even do it as part of a build script or as a cron job:

rm -rf ~/Library/Developer/Xcode/DerivedData

我删除了派生数据目录,并且看到NIB现在出现在构建产品中 - 所以我将这个作为一个神秘的Xcode bug。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM