ios – XCode 7:xcdatamodeld不存在

前端之家收集整理的这篇文章主要介绍了ios – XCode 7:xcdatamodeld不存在前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
更新到XCode 7后,为了支持iOS9,我遇到了以下构建错误
error: Cannot read bundle contents (Error Domain=NSCocoaErrorDomain Code=260 "The folder “VoIP.xcdatamodeld” doesn’t exist.

使用配置Debug构建项目myTitle的目标myTitle

DataModelCompile Build/Products/Debug-iphoneos/myTitle.app/
/Users/myself/MyDev/m1/app/VoIP/VoIP/VoIP.xcdatamodeld
cd /Users/myself/MyDev/m1/app/app/iPhone
export PATH=”/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin”
/Applications/Xcode.app/Contents/Developer/usr/bin/momc –sdkroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk
–iphoneos-deployment-target 7.0 –module myTitle /Users/myself/MyDev/m1/app/VoIP/VoIP/VoIP.xcdatamodeld
/Users/myself/MyDev/m1/app/app/iPhone/Build/Products/Debug-iphoneos/myTitle.app/

/Users/myself/MyDev/m1/app/VoIP/VoIP/VoIP.xcdatamodeld:: error: Cannot
read bundle contents (Error Domain=NSCocoaErrorDomain Code=260 “The
folder “VoIP.xcdatamodeld” doesn’t exist.” UserInfo=0x7fd0f350f990
{NSFilePath=/Users/myself/MyDev/m1/app/VoIP/VoIP/VoIP.xcdatamodeld,
NSUserStringVariant=(
Folder ),NSUnderlyingError=0x7fd0f350f940 “The operation couldn’t be completed. (OSStatus error -43.)”})

我该如何解决

我项目中关于此文件的唯一参考是这一个(在.project文件中)

/* Begin XCVersionGroup section */
                449367DE1338E89100DB4AC9 /* myTitle.xcdatamodeld */ = {
                        isa = XCVersionGroup;
                        children = (
                                449367DF1338E89100DB4AC9 /* VoIP.xcdatamodel */,);
                        currentVersion = 449367DF1338E89100DB4AC9 /* VoIP.xcdatamodel */;
                        name = myTitle.xcdatamodeld;
                        path = ../../../../VoIP/VoIP/VoIP.xcdatamodeld;
                        sourceTree = "<group>";
                        versionGroupType = wrapper.xcdatamodel;
                };
/* End XCVersionGroup section */

不知道它是如何产生的以及为什么它在以前的xcode版本中没有问题.

解决方法

检查“构建阶段”下的“编译源”,了解下图中描述的“目标”设置.

我仔细查看了所有资源,找到了一个没有任何路径的资源(一个未知的资源,我不知道它是如何出现的……).将其从那里取出,清洁产品并运行.

以上是我案件的唯一原因..

希望它能帮到你!!!

原文链接:https://www.f2er.com/iOS/332401.html

猜你在找的iOS相关文章