国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 學院 > 開發設計 > 正文

xcode7種使用coredata遇到Classnotfound,usingdefaultNSManagedObjectinstead.問題

2019-11-14 18:00:34
字體:
來源:轉載
供稿:網友
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

Up to XCode7 b3

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!

From Xcode7 beta 3

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 = NSEntityDescr

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 冷水江市| 沅陵县| 高清| 固镇县| 武定县| 大城县| 沂南县| 全州县| 平泉县| 青阳县| 九台市| 米泉市| 呼和浩特市| 广南县| 双柏县| 饶平县| 上虞市| 西丰县| 瓮安县| 枞阳县| 岑溪市| 广安市| 澜沧| 鄱阳县| 广州市| 许昌市| 灵丘县| 平舆县| 襄城县| 太谷县| 乌什县| 安岳县| 滦平县| 颍上县| 宁夏| 斗六市| 温州市| 广德县| 临汾市| 交口县| 正安县|