xcode 7种使用coredata遇到 Class not found, using default NSManagedObject instead.问题
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.问题的更多相关文章
- Xcode一种涉及到多桌面的调试技巧
大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;) Mac本身是支持多桌面功能的,以下是本猫OS界面的截图: 可以 ...
- Xcode两种调试小技巧
1."全局"断点 正常情况下如果代码有错误,会直接触发SIGXXXX信号,然后中断在main函数里. 但是我们还是不知道到底是什么引发了异常信号.我们可以在断点导航器中添加一个全局 ...
- Xcode8 1 创建coreData的ManagedObject后,报错 linker command failed with exit code 1
Xcode8 1 创建coreData的ManagedObject后,报错 使用Xcode 8.1 创建coreData的ManagedObject后,报错. duplicate symbol OBJ ...
- 【转】Xcode概览:调试应用程序
原文转自:http://www.cocoachina.com/ios/20141128/10358.html 本文由CocoaChina翻译组成员Creolophus(github主页)翻译自苹果官方 ...
- (转)关于CoreData的一个工具Mogenerator的使用
最近看到用CoreData时使用的工具Mogenerator,发现网上介绍其具体使用的不多,特此简单整理一下,关于CoreData这里就不具体说了,使用就用MagicalRecord,用起来真是太方便 ...
- iPhone开发 数据持久化总结(终结篇)—5种数据持久化方法对比
iPhone开发 数据持久化总结(终结篇)—5种数据持久化方法对比 iphoneiPhoneIPhoneIPHONEIphone数据持久化 对比总结 本篇对IOS中常用的5种数据持久化方法进行简单 ...
- 【转】CoreData以及MagicalRecord (一)
先粗略的了解下CoreData中的一些核心概念 1. CoreData 的核心概念 先上两幅关键的概念图 (1)NSManagedObjectModel 托管对象模型(MOM)是描述应用程序的数据模型 ...
- iOS数据库操作之coredata详细操作步骤
CHENYILONG Blog iOS数据库操作之coredata详细操作步骤 技术博客http://www.cnblogs.com/ChenYilong/ 新浪微博http://weibo.com/ ...
- [转]Xcode概览:调试应用程序
原文网址: blog.csdn.net/fhbystudy/article/details/12856261 本文由CocoaChina翻译组成员Creolophus(github主页)翻译自苹果官方 ...
随机推荐
- (转载)顺序栈c++实现
(转载)http://myswirl.blog.163.com/blog/static/51318642200882310239324/ SqStack.h********************** ...
- 水题:HDU 5119 Happy Matt Friends
Matt has N friends. They are playing a game together.Each of Matt's friends has a magic number. In t ...
- HTML5 Canvas核心技术—图形、动画与游戏开发.pdf7
性能 运行putImageData()比drawImage()慢,同等条件下优先考虑drawImage() 操作图像数据需要遍历大量数据,应该注意几点: 1)避免在循环体中直接访问对象属性,应当保存在 ...
- HUD 2089
不要62 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis ...
- Get familiar with key Frameworks of ios
Frameworks make your life easier as an iOS Developer. They allow you to reuse code written by other ...
- 《神经网络和深度学习》系列文章三:sigmoid神经元
出处: Michael Nielsen的<Neural Network and Deep Leraning>,点击末尾“阅读原文”即可查看英文原文. 本节译者:哈工大SCIR硕士生 徐伟 ...
- 手机APP上下滚动翻页效果
//页面初期加载时 $(document).ready(function () { //加载第一页 LoadList(); //滚动换页 $( ...
- 改变JVM中的参数以提高Eclipse的运行速度
首先建立评估体系,将workspace里所有的项目close掉,关闭eclipse.优化的用例就是启动eclipse,open一个项目,eclipse会自动build这个项目,保证没有感觉到明显的卡, ...
- mvn开发可执行的java程序
1. 用maven-assembly-plugin插件 2. 在项目的pom文件中加入以下该插件的配置 <span style="font-size:18px;">& ...
- iOS socket小结01
一.网络各个协议:TCP/IP.SOCKET.HTTP等 网络七层由下往上分别为物理层.数据链路层.网络层.传输层.会话层.表示层和应用层. 其中物理层.数据链路层和网络层通常被称作媒体层,是网络工程 ...