Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [core-data]

Core Data is Apple's object modeling and persistence framework for iOS, iPadOS, tvOS, watchOS, and macOS. Xcode provides an object model editor for specifying entities, attributes, and relationships.

-1 votes
0 answers
18 views

iOS app container structure changed - database not found

Today I'm downloading my in-development iOS app container (.xcappdata) from Xcode's devices and simulators window in order to see what's stored in the app using Core Data (and eventually use that ...
Damien's user avatar
  • 3,360
0 votes
0 answers
26 views

UITableViewCell reload while scrolling the screen

I have this UITableView in my iOS chat application, I'm using NSFetchedResultsController to fetch new messages from Coredata and show them to the screen. Insert a new message to the bottom of the ...
YosiFZ's user avatar
  • 7,872
-1 votes
0 answers
30 views

Read SwiftData store metadata using Core Data

I need to access store metadata, like version identifiers (NSStoreModelVersionIdentifiers). The starting point is a SwiftData stack, so I have my instance of ModelContainer and my ModelConfiguration. ...
Andrea Mario Lufino's user avatar
0 votes
0 answers
34 views

CoreData Crash - Collection <__NSCFSet: 0x600000c6b030> was mutated while being enumerated

I am kind of performing an upsert (update or insert) operation after fetching from an JSON API for some entities which have many to one relations. Eg: Sections contains Categories, Categories contains ...
hb_dev's user avatar
  • 1
1 vote
2 answers
35 views

Why doesn't LazyVStack release memory when scrolling

I have a `PhotosPicker` that selects an image. Then, upon pressing the "Save" button, I save it in `FileManager` and store its path in `CoreData`. When I need to retrieve them, I use a `...
Олександр Романюк's user avatar
0 votes
0 answers
18 views

Core Data Migration Mapping Model createRelationships crash

I've created a heavyweight migration between two database versions using a mapping model & custom policy. Three types are migrated during this migration map. However, one (or possibly more) types ...
Karim's user avatar
  • 281
-1 votes
1 answer
33 views

NSPredicate weird formatting behaviour

I am somewhat stuck trying to write a helper function for querying my CoreData store. For simple things (like string values etc) the following syntax works well: let predicate = NSPredicate(format:&...
Andriy Gordiychuk's user avatar
0 votes
1 answer
37 views

What are the steps to conform to the FieldRelationshipType protocol to use Field.Relationship in CoreStore?

Trying to learn CoreStore 9.2.0 with Swift 5.10 After compilation errors I have attempted to back my @Field.Relationship properties with the aliases and, at times, methods that are required to conform ...
schwabsauce's user avatar
0 votes
1 answer
119 views

How to save to specific Stores/Configurations in Core Data

I'm currently syncing core data with the CloudKit private and public databases, as you can see in the code below, I'm saving the private database in the default configuration in Core Data and the ...
fs_tigre's user avatar
  • 10.6k
1 vote
0 answers
97 views

CoreData async perform method usage

I faced some UI Hangs when using viewContext. So I used async perform method on viewContext to avoid blocking UI. But I'm still getting UI Hang reports. Here is my code and main thread stack. func ...
InTaek Cho's user avatar
1 vote
0 answers
63 views

Why does SwiftData hang when using a predicate?

For some reason, when using a predicate, my app freezes and hangs. It works fine with just @Query private var items: [Item] If you use the following arguments when running the app: -com.apple....
Марина Василевская's user avatar
0 votes
0 answers
35 views

Duplicate Class Implementation in SQLite causing objc[XXXXX] Error in Xcode Project [duplicate]

I'm encountering an issue in my iOS project where I'm getting the following error messages in the console when I run my app: objc[XXXXX]: Class _TtC6SQLite6Backup is implemented in both /System/...
JONGHUN PARK's user avatar
-2 votes
1 answer
66 views

How do I fix 'unrecognized selector sent to instance' in swift?

I am working on an app using coreData and a log in. For that, I have a LoginView and LoginViewModel that I use to get the info to the ContentView. I keep getting this error message: "Terminating ...
Jaanvi chirimar's user avatar
0 votes
1 answer
44 views

Is persistent history tracking in CoreData supported with legacy stack and Objective C?

Is it possible to implement Persistent History Tracking in an application/framework written in Objective C where Core Data stack has been setup manually in legacy manner? Or does persistent history ...
letsbondiway's user avatar
0 votes
1 answer
27 views

Override NSManagedObject getter/setter to modify data

I have an NSManagedObject class that stores, among other things, a JSON string that comes from a WkWebView form. The form in the web view allows the user to add images to the form; when the form is ...
Markus's user avatar
  • 2,522

15 30 50 per page
1
2 3 4 5
1949