简体   繁体   中英

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:

/* 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 . If I go back to Xcode 6.0 the problem disappear. 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). 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)

在此处输入图片说明

In Xcode Go to Build Settings.

In the "Strip NIB Files" option choose "NO".

That should solve it.

I had the same or very similar problem, but building in older Xcode didn't help. I had to switch framework project to https://github.com/jverkoey/iOS-Framework and errors were gone. Probably Xcode 6.1 changed some build settings or something like this.

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