Core-data Questions
Ad
Error Code 1560 vs 1570 when Saving to Core Data
What is the difference between both error code when saving core data? reading from some posts, both of them refer to same error description: the
The operation couldn’t be completed. (Cocoa error 1560.)
I am using core data in my application. i am getting this error when using transformable attribute to store nsarray. in short i
CoreData Entity to Model
I do get a json and parse it to my model. in order to use this data while i am offline, i do store it using core data. for this, i created an
NSInvalidArgumentException: nil is not a valid object ID
My app currently uses a navigationlink to open a view like this: lazyvgrid(columns: gridlayout, spacing: 10) {
How to save and store data locally and on a server simultaneously in Swift?
I am planning to make a mobile application for both ios and android. first, i would like to make the ios version of the app. i am planning to use
NavigationLink jumps back when @ObservedObject is changed and @AppStorage is used
I've tracked down an annoying bug in my code and managed to recreate the issue using xcode's default ios app as a starting point and adding a few
Firebase observations duplicating data?
If the conversation has already started, then i fetch messages from firebase using the last message in the cache, as
Cannot convert value of type 'Image' to expected argument type 'UIImage'
I am using an imagepicker to select an image from library and store in coredata (as binary). in another view this selected image is shown as a
Prefill textfields in SwiftUI is broken in iOS 15
In ios 14 i've following code which prefills all textfields from the coredata model struct editsimplesearchview: view {
Building with Xcode 13 (iOS 15 SDK) is not longer backward compatible with iOS 14.x targets
Just found out that building an app with the new ios 15 sdk (xcode 13 rc) is no longer backward compatible with ios 14.x targets when using
Ad
Check if date is in coming month
I'm setting a date to a certain birthdaytextfield like so @objc func birthdaydatepickervaluechanged(sender: uidatepicker) {
Coredata Fetched Results Controller save with child NSPrivateQueueConcurrencyType context
I have uicollectionviewcontroller with <nsfetchedresultscontrollerdelegate> and coredata singleton
Swift: CoreData error and how to set up entities and DataModels?
So far i can create my own data models in a swift file. something like: user.swift: class user { var name: string
IOS/Objective-C: Detect if nsmanaged object linked to another nsmanagedobject in core data
I allow comments on different types of items in my app such as books and songs. to link the comment to the item, i create a relationship in core
Import large amount of data into coredata with unique constraint
I have an entity word with keyword is a uniqueconstraint of type string. now i have to import large amount (>100000 records) of words with new
Core Data UML Diagram mindset
So i'm building my first "real" application with core data and i have a question whether i am thinking the right way or not. here's my
How to get DateSectionTitles using FetchedResultsController in Swift 4
I am using frc and i want to create sections that groups data according to date (dd mmmm)! each task has a date and i am using that date and
Trying to store CMTime as Transformable property on Core Data
I have used transformable properties of core data before but not with c objects like cmtime. i need to store a
Loading the results set for Core Data fetch request
I have a variable declared as such: private var thetext = string() private var aid = string() i then do a fetch
Saving an array of objects to Core Data
I have an array of type [user] and i want to save it in core data and later display it in a table view. here are my functions for saving and
App not crashing when i add/Modify new attribute to the data model without using any Migration (IOS 10+)
I have surfed the internet a lot. but didn't get any satisfactory answer. my questions is i'm using core data with persistent container
Ad
UITableView indexPath and maximum number of reusable cells
My uitableview with custom reusable cells is done but two issues remain: i can create 6 cells but when i add the 7th
EXC_BAD_ACCESS when safely unwrapping optional on NSManagedObject
I have the following base nsmanagedobject in our application: @objc(laravelentity) class laravelentity: nsmanagedobject {
Trigger `TableViewCell` function from `ViewWillAppear`
I would like to trigger func updatecellvaluelabel(...) from viewwillappear so my data is up to date
Database design for recipe app with shopping list feature (iOS CoreData)
I'm working on a recipe app that will have a shopping list feature and i'd like to know if approach is not wrong. recipe (one to
Delete CoreData object
I am still struggling with coredata to start the week haha. i finally succeeded in saving and fetching my array, now is time to edit
Writing into Many-to-Many relation in Core Data
Sorry if the question might be a dublicate but i didn't find anything relevant to my specific issue. so, i get data from an oline db and want to
How to delete a CKRecord if not yet finished creating due to bad network connection?
I am currently working on an iphone app which utilizes cloudkit for syncing the app data between the users devices. i use
Core Data: bundle.main.url Thread 1 fatal error
I've been fighting with this error for an hour now, i can't see what's wrong here...
NSFetchedResultsController - User Driven Changes
Overview i have an nsfetchedresultscontroller the user would be able to add new records (table view in
Remove or Add an attribute to CoreData at runtime programmatically
I have to create and remove attributes based on an api response in objective c. for example, now my api response contains fields
Core Data Many To Many Relations
I have a problem with ios core data and many to many relations. i want to write a fitness application. so i need three tables. following
Ad
Xcode DerivedData directory keeps returning after deletion
Deriveddata keeps returning into my project no matter how many different ways i try to delete it. this is causing a compile error. i
CoreData: Inserting from array of dictionaries into SQLite database happens unsorted - set of Foreign Key therefore not possible
I followed a tutorial on how to parse from a json file and preload a sqlite database according to this:
Why does NSManagedObject not get inserted into a child NSManagedObjectContext when the context is initialised inline?
I am using child nsmanagedobjectcontexts in my ios app as a scratchpad. i am using an extension of
Core Data sharing with CloudKit: Unable to Accept Share
I had my app working with core data, then cloudkit to sync between devices and now i'd like to share data between users. i watched both
Filtering values from coredata and assign to tableview
The values of my coredata entity order is stored in orderdetails. orderdetails has a count of 8 and it has
SwiftUI FetchRequest Order Output in Picker
I have a json i am fetching from a remote server that contains a list of countries (and id, the country name, and the country abbreviation). i am
Is it safe, to modify the CoreData generated NSManagedObject properties from Int32 to Int?
When designing coredata, we have to explicitly specific the bit of the used integer integer 16 integer 32 integer
SwiftUI, CloudKit - Can't Load Core Data NSPersistentCloudKitContainer
I have a fully developed app using core data. now that it is complete, i want to add cloudkit synchronization (like i have done with other apps).
How to store and load data properly with CoreData?
I am a beginner and never worked close with coredata. i have a json response, which results need to be shown in a table view. i want implement a
Populate UITextField by fetching a Core Data string
I'm trying to populate a uitextfield with data from a selected cell. when the table is populated, i use the array var
Coredata Lightweight Migration Fails
If i add a new model version and then add an attribute to an entity i get a migration failure. it doesn't matter what the type of the attribute is
Ad
SwiftUI, Core Data - Delete List Item with Context Menu
I'm trying to delete a list item with context menu. the data is fetched from core data. .ondelete works as expected with my deleteexercise
Should I create a relationship to second level child in a database, what's optimal?
I have the following data strucutre:
How can I update data using Core Data?
My problem is that i can easily add and delete data but when i am trying to update data in tableview did select method, when i update the last row
loading tableview from 2 different arrays
I have 2 coredata arrays. one has 3 elements and the other one also has 3 elements. now i want to load in my tableview both these arrays. so i'll
Coredata is not updated
I wanted to update one record in my core data entity and i write code for it but the data is not updated . there is entity posts and it
CoreData is setValue(_:forKey:) necessary in Swift?
When updating an entity in coredata, is it necessary to use setvalue(_:forkey:), or can you just set the value using the default
How can you get attribute names from an Entity from CoreData at an iOS app
I am reading data with following code from coredata but instead of that can we read first attribute names "firstname",
Not Showing Search results in Tableview From Coredata?
Hello i'am creating an app for storing college data and student data, crud operation is working perfectly with relation in coredata, i am facing
How to add Core Data to existing Xcode 9 Swift 4 iOS 11 project?
An update is requested, since this question has of course been answered for previous versions, the latest search result dated 12/16 generates
Adding one read only attribute to Core Data Model in Swift. Which doesn't exist in XCDataModel
Adding attribute to entity which don't exist in xcdatamodel was easily accomplised via @synthesize and @dynamic in objective c. please guide how
core data NSManagedObjectContext with NSMergePolicyType - Crash
I added nsmergepolicytype for my context but every time that i have a conflict the app is crash. i added constraints to the table in
Ad
CoreData mark one record as favourite (mutually exclusive)
Overview: i have an ios app that uses coredata there is an entity called
Check to see if an item has already been saved to CoreData
I'm saving items to favourites and retrieving them in a tableview. however right now a user can add duplicates of these items. i'm trying to avoid
How to(Can I) get the content of other section from a NSFetchedResultsController?
Suppose i have a database table like this: | id | gender| |------|-------| | 0001 | male | | 0002 | male | | 0003 |
Core data entity manager
I want to write class for manage all entity that i have in my application. there is my code fore managerclass for one custom entity, but i have a
Retrieve managed object and change value of attribute
For syncing between objects in core data on an iphone and server backend, i upload fresh objects to the server, grab a server id and then save the
Best way to avoid singleton
For our ios programming class we must make a framework for swift ios. we had the idea of a framework simplifying coredata manipulation. i began by
NSSortDescriptor get key from core data in Swift 4
I am new to ios developement and core data. in my application i want to use nssortdescriptor to sort data before fetching it to my
Save a copy of sqlite file in Core Data
I am trying to make a copy of current core data database file. after doing some research, i found that
Cloudkit strategy with inheritance
My data model is using inheritance with core data, and i can think of 3 strategies to store this data into cloudkit records. in the model
iOS - How to migrate 2 Entities into 1 using Core Data?
In my current model version i have this 4 entities : satellite (with relationship to one to satelliteanimation)
CoreData app crashes when deleting row from TableView
I have a dozen table view controllers that all work as expected, then i have this one which crashes with: terminating app due to uncaught
Ad
Many To Many with additional data using Swift and Core Data
I do a lot of apps (two tier apps) with sql server, and this is my first app in ios with core data. i am trying to figure out how to do
Relationship fault in Coredata
I know that there is much question about this problem on so, but none of them was helpful for me. i want to set array of students to each
Unwrap optionals of the type Date() from CoreData?
I have created a nsmanagedobject sreminderdate: date(). this is stored in the coredata. the value for this comes from the date and time set by the
Fails at setting codegen into CoreData
When setting codegen on entities(tag, note, category) in data model on category/extension and module 'current product module'
Updating CoreData Entity or saving a new one
I'm fairly new to coredata, and i'm trying to make a game. i have a couple of questions i was hoping you guys could help me out with some
Are logical operators in predicates short-circuited with NSFetchRequest?
I have an nspredicate that uses the logical or operator, like this: nspredicate(format: "activefrom == null or %@
Search data form CoreDataBase if search data similar with another data that contain special character
I have implemented core database in my application and fetching data from table. application requirement is fetch same data if data
iOS - Core Data : How to properly add object in context while performing a Lightweight Migration?
Some context: i will try to explain my situation as clear as i can so that you will have a better understanding of my
Why NSManagedObject instances should never be passed from one thread to another?
I was learning how to work with multiple managed object contexts, and in the midst of the drill let childcontext =
Why is there a Weak References Between Managed Objects and the Context?
When i was learning how to use child contexts : let childcontext = nsmanagedobjectcontext( concurrencytype:
How should I name importable .sqlite persistent store?
I am creating coredatastack with pre importing .sqlite database file into my project. func seedcoredatacontaineriffirstlaunch() {
Ad
How to connect items to category in one to many relationship when insert data
I have 2 entities one customers and other is cases, the relationship is one to many one customer had many cases and the relation names tocustomers
Update a specific record in coredata in AppDelegate Class
I want to update a specific record in coredata in appdelegate class. but not getting success. in other custom classes it works perfect but i think
Can one core data entity to have relationships with multiple entities
I have a question of this data model. entitya entity have a one to one relationship with entityb entity. now i
Core Data integer value store through text field
In core data inside person entity i have an attribute phonenumber whose type i have set to integer 64 bit. in viewcontroller.m, file
Retrieving NSManagedObjects Issue (Core Data)
Here is my issue, i am using core data to store around 58 documents. all they have is 4 nsstring attributes. i have a helper class that is set up
UITableview Section?
I am trying to have two sections in my tableview. i would like items to add to section 0 and then be able to select a row to move it from section
Fetch Request execution method returns nothing
In my application i use core data to keep some basic information about user and to easily get data i created an assistant class which
Ad
Blog Categories
Ad