CoreData: warning: Unable to load class named 'CoreDataSwift2_2.Bowtie' for entity 'Bowtie'.  Class not found, using default NSManagedObject instead.

fatal error: NSArray element failed to match the Swift Array Element type

xcode 7 中遇到这种问题纠结了好久,最终解决了。

This warning is quite annoying. It appears spuriously. I have been able to get rid of it in most cases by making sure that the class is set correctly in the model editor. Unlike in many other SOF posts, the suggestion to include the module name (like MyApp.Shows) has not helped me.

1.
Version that works up to Xcode 7 beta 3

Notice that I corrected your entity name to the more appropriate singular.

Version that works for Xcode 7 beta 4 and above

You need to delete the text "Current Product Module" in Module!

2.
You should also follow the frequent recommendation to include

@objc(Show)

just above your class.

Note: If you are using Xcode 7 beta 4 or later, this step is optional.

3.
Also make sure to cast the created managed object to the proper class, as the default would be just NSManagedObject.

var newShow = NSEntityDescription.insertNewObjectForEntityForName("Show",
inManagedObjectContext: context) as Show

xcode 7种使用coredata遇到 Class not found, using default NSManagedObject instead.问题的更多相关文章

  1. Xcode一种涉及到多桌面的调试技巧

    大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) Mac本身是支持多桌面功能的,以下是本猫OS界面的截图: 可以 ...

  2. Xcode两种调试小技巧

    1."全局"断点 正常情况下如果代码有错误,会直接触发SIGXXXX信号,然后中断在main函数里. 但是我们还是不知道到底是什么引发了异常信号.我们可以在断点导航器中添加一个全局 ...

  3. Xcode8 1 创建coreData的ManagedObject后,报错 linker command failed with exit code 1

    Xcode8 1 创建coreData的ManagedObject后,报错 使用Xcode 8.1 创建coreData的ManagedObject后,报错. duplicate symbol OBJ ...

  4. 【转】Xcode概览:调试应用程序

    原文转自:http://www.cocoachina.com/ios/20141128/10358.html 本文由CocoaChina翻译组成员Creolophus(github主页)翻译自苹果官方 ...

  5. (转)关于CoreData的一个工具Mogenerator的使用

    最近看到用CoreData时使用的工具Mogenerator,发现网上介绍其具体使用的不多,特此简单整理一下,关于CoreData这里就不具体说了,使用就用MagicalRecord,用起来真是太方便 ...

  6. iPhone开发 数据持久化总结(终结篇)—5种数据持久化方法对比

    iPhone开发 数据持久化总结(终结篇)—5种数据持久化方法对比   iphoneiPhoneIPhoneIPHONEIphone数据持久化 对比总结 本篇对IOS中常用的5种数据持久化方法进行简单 ...

  7. 【转】CoreData以及MagicalRecord (一)

    先粗略的了解下CoreData中的一些核心概念 1. CoreData 的核心概念 先上两幅关键的概念图 (1)NSManagedObjectModel 托管对象模型(MOM)是描述应用程序的数据模型 ...

  8. iOS数据库操作之coredata详细操作步骤

    CHENYILONG Blog iOS数据库操作之coredata详细操作步骤 技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http://weibo.com/ ...

  9. [转]Xcode概览:调试应用程序

    原文网址: blog.csdn.net/fhbystudy/article/details/12856261 本文由CocoaChina翻译组成员Creolophus(github主页)翻译自苹果官方 ...

随机推荐

  1. (转载)Linux中cp直接覆盖不提示的方法

    (转载)http://soft.chinabyte.com/os/220/11760720.shtml 新做了服务器,cp覆盖时,无论加什么参数-f之类的还是提示是否覆盖,这在大量cp覆盖操作的时候是 ...

  2. 数学:lucas定理的总结

    今天考试的题目中有大组合数取模,不会唉,丢了45分,我真是个弱鸡,现在还不会lucas. 所以今天看了一下,定理差不多是: (1)Lucas定理:p为素数,则有: 即:lucas(n,m,p)=c(n ...

  3. List 三种遍历的方法

    学习java语言list遍历的三种方法,顺便测试各种遍历方法的性能,测试方法为在ArrayList中插入1千万条记录,然后遍历ArrayList,发现了一个奇怪的现象,测试代码如下: package ...

  4. ASP.NET生命周期详解 [转]

    最近一直在学习ASP.NET MVC的生命周期,发现ASP.NET MVC是建立在ASP.NET Framework基础之上的,所以原来对于ASP.NET WebForm中的很多处理流程,如管道事件等 ...

  5. 获取客户端IP地址 via C#

    获取客户端IP地址 via C# 说明:本文中的内容是我综合博客园上的博文和MSDN讨论区的资料,再通过自己的实际测试而得来,属于自己原创的内容说实话很少,写这一篇是为了记录自己在项目中做过的事情,同 ...

  6. HDOJ/HDU 2352 Verdis Quo(罗马数字与10进制数的转换)

    Problem Description The Romans used letters from their Latin alphabet to represent each of the seven ...

  7. Ubuntu----1

    1. 安装ubuntu之后,你必须要做的事情, 引自:http://itsfoss.com/things-to-do-after-installing-ubuntu-13-04/ 但是对于国人来讲,墙 ...

  8. Bzoj 1878: [SDOI2009]HH的项链 莫队

    1878: [SDOI2009]HH的项链 Time Limit: 4 Sec  Memory Limit: 64 MBSubmit: 2717  Solved: 1363[Submit][Statu ...

  9. 51单片机产生1Hz-5kHz可调占空比方波

    学校的课程设计,总结一下. 注意 1.高低电平的改变不适合在主函数的while循环中,因为要有数码管动态显示的延时和其它逻辑处理,时间太长会不能及时改变高低电平值. 2.中断的执行时间一定是不能超过定 ...

  10. 再次分享 pyspider 爬虫框架 - V2EX

    再次分享 pyspider 爬虫框架 - V2EX block