Skip to main content

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.

0 votes
0 answers
13 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
0 votes
0 answers
41 views

Add Local Persistence using CloudKit & Core Data [closed]

I'm attempting to add local persistence to items fetched from CloudKit using Core Data in my app, but I'm not achieving the desired behavior. Here's what I aim to accomplish: User opens the app. ...
Adventure's user avatar
-1 votes
1 answer
24 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
116 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
95 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
56 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
65 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
0 votes
1 answer
40 views

Accessing CoreData Attribute causes Unrecognized selector sent to instance

I have a project where CoreData stores the user info on-device. The problem is that whenever I try to retrieve an attribute, it sends me an error. It only crashes whenever I access fName in the ...
Someone's user avatar
  • 30
-1 votes
1 answer
80 views

Sorting a large number of core data entities

I have a Song entity in Core data and each of them has an index attribute of type integer. I am expecting a large number of song entities in the range of 10k to 100k and want to maintain order. The ...
SwiftUIEnthusiast's user avatar
0 votes
0 answers
33 views

Mix local and sever data in entity Core Data

I have a situation. I am fetching the data from the server and saving in Core data. That is working fine but my problem is as described, I have made some changes in core data and then I send the ...
Gurinder Batth's user avatar
0 votes
0 answers
27 views

Finding ranges of all occurrences of a string in core data

I am looking for a way to get ranges of all occurrences of a string in a larger string in Core data. My current solution involves finding all the objects that have at least one occurrence and then ...
Kaunteya's user avatar
  • 3,092

15 30 50 per page
1
2 3 4 5
1949