core-data Questions

2

I'm using NSPersistentCloudKitContainer to synchronise data between different devices with CloudKit. It works perfectly well with a new project, however when I'm using it with old projects the old ...
Allocution asked 3/7, 2019 at 18:10

3

Solved

I am developing a macOS and iOS app with SwiftUI. Both are using CoreData and iCloudKit to sync data between both platforms. It is indeed working very well with the same iCloud Container. I am faci...
Swine asked 6/9, 2020 at 12:20

2

I'm building a Macos CoreData+CloudKit app. I first create my container by doing this: let container = NSPersistentCloudKitContainer(name: "TestApp") let description = container.persisten...
Balthasar asked 8/2, 2021 at 4:37

7

Solved

I did a core-data model: class Order: NSManagedObject { ... //code } but when I try to build I get an error: 'Order' is ambiguous for type lookup in this context
Kismet asked 25/9, 2018 at 10:59

12

Solved

While building my project for different target I am getting this error: Could not determine generated file paths for Core Data code generation: Error Domain=NSCocoaErrorDomain Code=260 "No cur...
Tiffanytiffi asked 9/1, 2017 at 10:17

3

Solved

There is a similar question in stack overflow already but it doesn't work for me. There is a use case in my application where I have to observe the database changes to perform some operation. To r...

24

Solved

I had a project that was working fine. It had "Core Data" checked, and had the data model all set up. I only started adding a couple entities and properties tonight. When I try to run my app now, i...
Spancake asked 12/11, 2010 at 4:21

4

Solved

Why entity cannot have uniqueness constraints with to-one mandatory inverse relationship? Having two entities: Person property: name relationship: department (to-one, non-optional) Departmen...
Kyser asked 29/9, 2015 at 13:22

20

Solved

I've created simple entity 'CDWorkout' with one attribute 'name' inside CDModel.xcdatamodeld. Name of container in AppDelegate is also 'CDModel'. Class Codegen for 'CDWorkout' is Category/Extension...
Messina asked 1/8, 2017 at 9:50

2

Solved

When I checked Used with CloudKit, the error Folder.children must not be ordered appeared. Any idea about an ordered relationship? Using Xcode 11 (beta 3). Here's the Folder Entity:

3

Solved

I have a swift bunch of files that provides some services above CoreData. I had unit tests running fine. I decided to move all this into a Swift Package using XCode 11. The unit tests don't run an...
Campbellbannerman asked 6/10, 2019 at 16:0

3

I have a simple NSManagedObject subclass: @objc class MyModel: NSManagedObject { @NSManaged var myProperty: String } However, the following code: var model = NSEntityDescription.insertNewObjec...
Conic asked 5/8, 2014 at 14:42

3

In my application I am using HomeKit. You can add/remove HMHome and HMRoom object, but I would also like to add some metadata to them. For example in my application I want to be able to add an icon...
Jerrilyn asked 14/2, 2015 at 6:57

5

Solved

(first noticed on: Xcode 8.2.1, iOS 10, Swift 3) (still present as of: Xcode 9 beta 3, iOS11, Swift 4) We all know that the Core Data concept of optionals precedes and is not strictly tied to the ...
Remanence asked 6/3, 2017 at 10:3

7

I'm trying to release an app to the app store tonight. I've been developing the Xcode 6 - Beta 2 for the past few months (Objective-C only) and didn't know you were not allowed to submit via Xcode ...
Seismism asked 31/8, 2014 at 5:11

7

Solved

I have a view showing messages in a team that are filtered using @Fetchrequest with a fixed predicate 'Developers'. struct ChatView: View { @FetchRequest( sortDescriptors: [NSSortDescriptor(keyP...
Wayne asked 10/9, 2019 at 12:43

9

Solved

Let's say I have two Entity classes: SocialApp and SocialAppType In SocialApp I have one Attribute: appURL and one Relationship: type. In SocialAppType I have three Attributes: baseURL, name and fa...
Weslee asked 18/4, 2009 at 20:23

4

I'm using Core Data in an iOS 7+ app that does not need to save user's data, all data the app needs is requested to services and it can be recovered at any time. So, if I change my data model in a ...
Acciaccatura asked 13/3, 2015 at 7:54

0

In my recent endeavor, I aimed to introduce new Fetch Index Elements to the Core Data model of my iOS application. To achieve this, I followed a process of lightweight migration, detailed as follow...
Interflow asked 16/3 at 6:46

2

I tried to migrate my CoreData-Model (with CloudKit) and it duplicated all of the objects I had stored. How can I correctly migrate when using CoreData with CloudKit? Summary I am using CoreData wi...
Niccolo asked 30/8, 2020 at 11:10

3

Solved

What is database seeding in the context of Core Data?
Boote asked 24/11, 2012 at 22:59

16

I'm not sure what I'm doing wrong here, but when I save the first time into coredata, it works just fine. When I try to overwrite that, it doesn't. func testStuff() { var token = loadLoginData() ...
Unkind asked 13/10, 2014 at 17:4

2

Solved

I'm confronted with the following problem in Swift. I wrote the following function to retrieve all persons in my model with the name "David". private func myFetchRequest() { let moc = (UIApplica...
Yul asked 8/8, 2016 at 15:2

2

I'm working with Core Data. I have a field called date that could contain a date or nil. I want to make a second field called sortDate that will use the date value from the date field if there is ...
Ordinal asked 25/9, 2019 at 10:43

4

Solved

I want to use new Core Data API introduced in iOS10. @available(iOS 10.0, *) open class func fetchRequest() -> NSFetchRequest<NSFetchRequestResult> I created generic function to fetchi...
Muriel asked 5/1, 2018 at 14:37

© 2022 - 2024 — McMap. All rights reserved.