gpt4 book ai didi

ios - 核心数据错误 SIGABRT : keypath AttributeName not found in entity

转载 作者:可可西里 更新时间:2023-11-01 00:36:36 25 4
gpt4 key购买 nike

我在我的 iOS 应用程序中使用核心数据。我有两个实体“Commit”,属性为“commitID”、“completionStatus”、“contents”和“repeatStatus”,还有一个实体“ToDoList”,属性为“dateID”。两者通过一种关系将许多提交关联到一个 ToDoList。

我每次都会收到以下错误。我试过删除并重新安装该应用程序,但无济于事。我知道这个错误是在我的 application(application: didFinishLaunchingWithOptions:) 方法之后抛出的:

2016-05-07 10:54:14.131 CommitToday[1836:47383] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath commitID not found in entity <NSSQLEntity ToDoList id=2>'
*** First throw call stack:
(
0 CoreFoundation 0x00000001027d7d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010457bdeb objc_exception_throw + 48
2 CoreData 0x000000010242efff -[NSSQLGenerator newSQLStatementForRequest:ignoreInheritance:countOnly:nestingLevel:nestIsWhereScoped:] + 1583
3 CoreData 0x00000001023217e3 -[NSSQLGenerator newSQLStatementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:nestIsWhereScoped:] + 35
4 CoreData 0x00000001024147b8 -[NSSQLAdapter _statementForFetchRequest:ignoreInheritance:countOnly:nestingLevel:] + 344
5 CoreData 0x000000010232167c -[NSSQLAdapter _newSelectStatementWithFetchRequest:ignoreInheritance:] + 316
6 CoreData 0x00000001023212f6 -[NSSQLCore newRowsForFetchPlan:] + 118
7 CoreData 0x0000000102320bac -[NSSQLCore objectsForFetchRequest:inContext:] + 524
8 CoreData 0x0000000102320549 -[NSSQLCore executeRequest:withContext:error:] + 377
9 CoreData 0x0000000102405eaf __65-[NSPersistentStoreCoordinator executeRequest:withContext:error:]_block_invoke + 3311
10 CoreData 0x000000010240f4dd gutsOfBlockToNSPersistentStoreCoordinatorPerform + 189
11 CoreData 0x00000001024005ed _perform + 221
12 CoreData 0x00000001023201b4 -[NSPersistentStoreCoordinator executeRequest:withContext:error:] + 500
13 CoreData 0x000000010231e973 -[NSManagedObjectContext executeFetchRequest:error:] + 579
14 CoreData 0x000000010244d6c2 __43-[NSFetchedResultsController performFetch:]_block_invoke + 258
15 CoreData 0x000000010240f4dd gutsOfBlockToNSPersistentStoreCoordinatorPerform + 189
16 libdispatch.dylib 0x00000001050143eb _dispatch_client_callout + 8
17 libdispatch.dylib 0x0000000104ff8ef5 _dispatch_barrier_sync_f_invoke + 393
18 CoreData 0x00000001023ff076 -[NSPersistentStoreCoordinator performBlockAndWait:] + 198
19 CoreData 0x0000000102366127 developerSubmittedBlockToNSManagedObjectContextPerform + 199
20 CoreData 0x0000000102365fee -[NSManagedObjectContext performBlockAndWait:] + 222
21 CoreData 0x000000010244d4bc -[NSFetchedResultsController performFetch:] + 524
22 CommitToday 0x00000001022404e4 _TFC11CommitToday14ViewController11viewDidLoadfT_T_ + 164
23 CommitToday 0x0000000102240d42 _TToFC11CommitToday14ViewController11viewDidLoadfT_T_ + 34
24 UIKit 0x000000010319a984 -[UIViewController loadViewIfRequired] + 1198
25 UIKit 0x00000001031defae -[UINavigationController _layoutViewController:] + 54
26 UIKit 0x00000001031df882 -[UINavigationController _updateScrollViewFromViewController:toViewController:] + 462
27 UIKit 0x00000001031df9f4 -[UINavigationController _startTransition:fromViewController:toViewController:] + 126
28 UIKit 0x00000001031e0c4d -[UINavigationController _startDeferredTransitionIfNeeded:] + 890
29 UIKit 0x00000001031e1d0b -[UINavigationController __viewWillLayoutSubviews] + 57
30 UIKit 0x0000000103390503 -[UILayoutContainerView layoutSubviews] + 248
31 UIKit 0x00000001030ba980 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
32 QuartzCore 0x0000000107aafc00 -[CALayer layoutSublayers] + 146
33 QuartzCore 0x0000000107aa408e _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
34 QuartzCore 0x0000000107aa3f0c _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
35 QuartzCore 0x0000000107a983c9 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
36 QuartzCore 0x0000000107ac6086 _ZN2CA11Transaction6commitEv + 486
37 QuartzCore 0x0000000107ac67f8 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
38 CoreFoundation 0x00000001026fcc37 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
39 CoreFoundation 0x00000001026fcba7 __CFRunLoopDoObservers + 391
40 CoreFoundation 0x00000001026f211c CFRunLoopRunSpecific + 524
41 UIKit 0x0000000102ffaf21 -[UIApplication _run] + 402
42 UIKit 0x0000000102ffff09 UIApplicationMain + 171
43 CommitToday 0x000000010223c302 main + 114
44 libdyld.dylib 0x000000010504892d start + 1
45 ??? 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

最佳答案

来自错误信息:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'keypath commitID not found in entity [NSSQLEntity ToDoList id=2]'

它似乎试图访问 ToDoList 实体上名为 commitID 的属性。这表明您的抓取或抓取结果 Controller 配置不正确。

关于ios - 核心数据错误 SIGABRT : keypath AttributeName not found in entity <NSSQLEntity EntityName id=2>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37086657/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com