Questions tagged [nsmanagedobjectmodel]

An NSManagedObjectModel object describes collection of entities that you use in your application. It is available in OS X v10.4 and later and available in iOS 3.0 and later .

56 questions
0
votes
1 answer

CoreData bug in Xcode 12.1

I am working through Paul Hudson's 100 Days of SwiftUI and on Project 11 have hit a frustrating issue with CoreData. This is a direct lift of Paul's code that compiles and runs fine in his video. The Bookworm.xcdatamodeld has a single entity named…
0
votes
0 answers

Core data crash reason: +entityForName: could not locate an entity named 'DataBasket' in this model

I have different model of coredata in my project. Certainly I added xcdatamodel file in my project, it crash because in my Appdelegate I have: - (NSManagedObjectModel *)managedObjectModel { if (managedObjectModel != nil) { …
Steven
  • 762
  • 1
  • 10
  • 27
0
votes
1 answer

How to save data from multiple view controllers into a single core data entity

I have an entity which has attributes that get populated from 5 view controllers. The app is basically a detailed form based questionnaire with 5 questions and each of the 5 view controllers consists of one question and its set of answer choices. In…
0
votes
0 answers

NSManagedObjectModel could not read the MetaModel.mom from the path

if (_metaContextModel == nil) { if (s_metadataModelRoot == nil) { NSString *modelPath = [[NSBundle mainBundle] pathForResource: @"MetaModel" ofType: @"momd"]; BOOL isDirectory; if…
0
votes
2 answers

Subclassing NSArrayController causes objects from ManagedObjectContext doesn't show in NSTableView

That's very strange. I have a Model with three Entities. Like this: In InterfaceBuilder I made NSArrayController connected to MOC via RepresentedObject to ViewController. Everything works, I can add and delete Master objects, select them, I can…
Łukasz
  • 773
  • 5
  • 23
0
votes
1 answer

Use of undeclared type "NSManagedObjectModel"

I am trying to translate my code from Objective-C to Swift but for NSManagedObjectModel I get this error: Use of undeclared type NSManagedObjectModel. The code in Objective-C: NSManagedObjectModel *managedObjectModel; NSManagedObjectContext…
Steven
  • 762
  • 1
  • 10
  • 27
0
votes
1 answer

Large amount of crashes on core data managedobjectmodel

Using Fabrics crash analytics or "Crashlytics" I am getting a large amount of crashes (I assume BAD_ACCESS) from the following method/property : lazy var managedObjectModel: NSManagedObjectModel = { // The managed object model for the…
Jason F
  • 309
  • 4
  • 11
0
votes
0 answers

How do you sync a new Core Data entity via data graph with the code?

I merely want to add an entity to an existing NSManagedObject Data Graph and access that entity in code. In this case, I've added 'Address': The existing code works. I merely added: let address = Address(context:self.context!) ...as was…
Frederick C. Lee
  • 9,019
  • 17
  • 64
  • 105
0
votes
1 answer

URL to NSManagedObjectModel is NULL

I reworked the core data model for my app, beyond the point where lightweight migration would work. So I now have two core data models in the app bundle and I need to access each individually (for regular core data setup and for a manual…
Henry95
  • 623
  • 6
  • 16
0
votes
1 answer

NSManagedObject and CoreData in swift 3 Xcode 8

I am using Xcode 8 and swift 3, i'm create NSManagedObject for my entity from Editor menu, NSManageObjectModel, how can use this file for fetch and create object, in Xcode 7 i'm using core data stack for creating manage object, persistent store and…
ava
  • 1,148
  • 5
  • 15
  • 44
0
votes
2 answers

Easy Core Data migration during early development, when Data Loss is expected and acceptable

When a Core Data app is in early development, its Managed Object Model is often in constant flux. For each build, new Managed Objects and properties are added or deleted from the model. When the Managed Object Model changes, the app will crash on…
0
votes
2 answers

While fetching Data through core data, automatically inserting the existing rows again

I am new to core data. I am trying to implement it in the object oriented way. As a sample project, I created a View Controller which shows data from an sqlite database through core data and the data is entered by another viewController. However, I…
Natasha
  • 6,651
  • 3
  • 36
  • 58
0
votes
1 answer

The best way to store "Item-ItemDetails" in CoreData

As 99% of iOS apps, mine has a main screen with a long list of items, and when a user taps one, he sees item details. Pretty much straightforward. Let's say, to render the first screen I need titles and images. And for the second one - a large html.…
Artem Stepanenko
  • 3,423
  • 6
  • 29
  • 51
0
votes
1 answer

CoreData Object Move Between Entities Not Working

I have two entities and they have the exact same three attributes (name, desc, displayOrder), both have a handful of records, and my goal is to add/insert every item from "Entity 1" into "Entity 2". Close, But No Cigar I think my code is quite…
Dave G
  • 12,042
  • 7
  • 57
  • 83
0
votes
1 answer

Including ManagedObjectModel in a Framework

I am developing a framework for which I would like to include an NSManagedObjectModel with abstract entities that are designed to be subclassed in the application. Is it possible for an application to subclass entities in the NSManagedObjectModel in…
ChemDev
  • 827
  • 1
  • 8
  • 23