[英]Xcode 6.1 - Nib couldn’t be opened because you don’t have permission to view it
I have this really weird problem. 我有这个很奇怪的问题。 After upgrading to Xcode 6.1 I get these error on some random nibs: 升级到Xcode 6.1后,我在一些随机的笔尖上收到以下错误:
/* com.apple.ibtool.errors */
/Users/xxx/Library/Developer/Xcode/DerivedData/WorkspaceInfinity-fufemvkrqrpfbmcwcrcicvoxtmvj/Build/Products/Debug-iphoneos/CoreFramework.embeddedframework/Resources/yyy.nib:
error: The file “yyy.nib” couldn’t be opened because you don’t have permission to view it.
Failure Reason: You don’t have permission.
Recovery Suggestion: To view or change permissions, select the item in the Finder and choose File > Get Info.
Underlying Errors:
Description: The operation couldn’t be completed. Permission denied
Failure Reason: Permission denied
I'm using kstenerud iOS Universal Framework solution . 我正在使用kstenerud iOS通用框架解决方案 。 If I go back to Xcode 6.0 the problem disappear. 如果我回到Xcode 6.0,问题就会消失。 I tried all the common solutions like delete derived datas, clean the product, re-add these files on the project. 我尝试了所有常见的解决方案,例如删除派生数据,清洁产品,将这些文件重新添加到项目中。
If I look into the App package I see that instead of these nibs I have an alias to them (which is not working). 如果查看App包,我会发现它们不是这些笔尖,而是别名(不起作用)。 Seems like the Copy Bundle Resources step might be broken. 似乎“复制捆绑包资源”步骤可能已损坏。
Try this: 尝试这个:
Select Project (under target )--> Build Settings --> Build Options 选择项目 (在目标下)-> 构建设置 -> 构建选项
set Compiler for C/C++/Objective-C to Default compiler(Apple LLVM 6.0) 将C / C ++ / Objective-C的 编译器设置为默认编译器(Apple LLVM 6.0)
In Xcode Go to Build Settings. 在Xcode中,转到“构建设置”。
In the "Strip NIB Files" option choose "NO". 在“ Strip NIB Files”选项中,选择“ NO”。
That should solve it. 那应该解决。
I had the same or very similar problem, but building in older Xcode didn't help. 我遇到了相同或非常相似的问题,但是在较旧的Xcode中进行构建并没有帮助。 I had to switch framework project to https://github.com/jverkoey/iOS-Framework and errors were gone. 我不得不将框架项目切换到https://github.com/jverkoey/iOS-Framework ,错误消失了。 Probably Xcode 6.1 changed some build settings or something like this. Xcode 6.1可能更改了一些构建设置或类似的东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.