国产探花免费观看_亚洲丰满少妇自慰呻吟_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

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 靖边县| 徐水县| 天峨县| 宁津县| 宁德市| 河东区| 黄山市| 安乡县| 淮滨县| 东山县| 三明市| 桐乡市| 德江县| 正蓝旗| 林州市| 昭觉县| 邢台县| 古田县| 隆化县| 汾阳市| 大洼县| 怀柔区| 遂平县| 英吉沙县| 江川县| 宝丰县| 威信县| 赤城县| 临沭县| 东兰县| 思南县| 黄骅市| 边坝县| 晴隆县| 两当县| 合水县| 曲阳县| 崇州市| 天长市| 上蔡县| 阳东县|