xcode Interface Builder XIB 错误 - 无法写入路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19688276/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:13:48  来源:igfitidea点击:

Interface Builder XIB Error - Unable to write to path

xcodeinterface-builderxcode5

提问by Warren P

I get sporadic, occasional one-time errors that often clear up on a second attempt at building, after cleaning or holding down the Option key and clicking Product -> Clean Build Folder.

在清理或按住 Option 键并单击“产品”->“清理构建文件夹”后,我会遇到零星的、偶尔的一次性错误,这些错误通常会在第二次构建时清除。

Is there anything I can do to avoid errors like this one which seem to be tied to a single .xcproj (XCode Project) that is my main xcode project. It never happens on a new or empty product, and always seems to fail on the same Nib file (MainWindow-iPhone.nib).

我能做些什么来避免这样的错误,这些错误似乎与作为我的主要 xcode 项目的单个 .xcproj(XCode 项目)相关联。它永远不会发生在新的或空的产品上,并且似乎总是在同一个 Nib 文件 ( MainWindow-iPhone.nib)上失败。

full error message:

完整的错误信息:

  /Users/user/XCodeWork/iPhoneDev/MyAppSourceFolder/en.lproj/MainWindow-iPhone.xib: 
  Compilation failed. Unable to write to path:        
  /Users/user/Library/Developer/Xcode/DerivedData/MYAPPNAME-
  dudnhxzgpqtcnqcgaguirvkhmvco/Build/Intermediates/ArchiveIntermediates/
  MYAPPNAME/InstallationBuildProductsLocation/Applications/MyAppname.app/
  en.lproj/MainWindow-iPhone.nib

I've had a look at folder permissions and I have full rights to the Intermediates folder paths shown above. Just incase there is some sudolike crap happening inside XCode's build, I set the path to everyone having Read & Write permission, but that does not fix it.

我查看了文件夹权限,并且我对上面显示的中间文件夹路径拥有完全权限。以防sudo万一在 XCode 的构建中发生了一些类似的废话,我为每个拥有读写权限的人设置了路径,但这并不能解决问题。

The above error happens during regular debug build, as well it occurs during Archive operations, and often it prevents me from completing the archive step.

上述错误发生在常规调试构建期间,也发生在存档操作期间,通常会阻止我完成存档步骤。

I am using XCode 5.0.1 (5A2053) on OS X Mavericks 10.9 (13A603)

我在 OS X Mavericks 10.9 (13A603) 上使用 XCode 5.0.1 (5A2053)

采纳答案by Josue

I found the solution!! (At least it has worked for me).

我找到了解决方案!!(至少它对我有用)。

For every xib's that we've problems, in the right panel go to the first tab, "Interface Builder Document" -> "Builds for" and select "iOS 7.0 and Later". My old configuration was "iOS 4.3 and Later".

对于我们遇到的每个 xib,在右侧面板中转到第一个选项卡,“Interface Builder Document”->“Builds for”并选择“iOS 7.0 and later”。我的旧配置是“iOS 4.3 及更高版本”。