Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [core-data]

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

3
votes
1answer
40 views

Core Data Wrapper

I built a wrapper in Swift to practice CoreData. My question is more general, I hope this is acceptable. I wanted to know whether my implementation of this wrapper is correct or poorly implemented ...
0
votes
0answers
51 views

Using unique objects in CoreData

I am not very familiar with CoreData, some I am not sure if the way I am handling relationships between objects is the right way to do it. I have the following ...
2
votes
1answer
114 views

Quiz app with Practice and Exam modes

I am building a Quiz app in swift (my first app) to practice a few skills (using CoreData, working with plists, UIKit etc.) and later to work with a server which stores the Exercises. Here's my ...
1
vote
0answers
58 views

Weight Lifting App to calculate a One Rep Maximum

I'd like feedback on the main entity in the Core Data model of my "One Rep Max" weightlifting calculator. All feedback is appreciated and in particular, I'd like to know if I've done a decent job of ...
1
vote
1answer
298 views

Core-data object with relationships conforming protocol in swift

I have a situation where I have to use protocol to be conformed by NSManagedObject which has relationships with other entities. My protocol is like: ...
1
vote
0answers
142 views

Multi-Context CoreData Implementation

I'm using Mulit-Context CoreData for Asynchronous Saving, which follows this architecture: Here is code stack: ...
2
votes
0answers
94 views

Private contexts and their parents in CoreData

I find myself following this pattern a lot in my core data code, which works, but I'm wondering if it is needed... ...
3
votes
1answer
3k views

iOS Core Data Model with Swifty JSON

I have been using SwiftyJSON to create my models of Object in Swift. But recently, I moved to CoreData for saving the objects locally. I am new to CoreData and want to know the best practices I should ...
0
votes
1answer
305 views

Passing an NSManagedObjectContext

I've been experimenting with how to pass my managed object context throughout my application in Core Data and I came across an approach that I'd like reviewed. I've been creating a protocol for all ...
2
votes
1answer
157 views

Weightlifting calculator

I'm building a simple iOS app using Swift that calculates the One Rep Max weight a user can theoretically lift. User inputs a weight lifted, the number of repetitions and the app uses one of several ...
2
votes
1answer
846 views

Table View Controller for selecting and saving user default preferences in an iOS app

This is the Swift code from one of the view controllers in my app that calculates a one rep maximum weight a person can theoretically lift. This particular view controller presents a list in a ...
3
votes
1answer
749 views

Tracking a geolocation

I have created this ViewController using Swift. Its job is to track geolocation and draw a line on a map and save it to core data object. I just want some advice on ...
8
votes
1answer
20k views

Coredata delete all data in an entity

I have this code that I am using to delete all records from an entity. The question is can it be done better or is already the best? ...
10
votes
1answer
3k views

Changing image of a UIImageView based on a scrollView contentOffset

My task is pretty simple and my code works, it's just that my code feels a bit clumsy to me (and probably will for you too). I have a view controller (...
4
votes
1answer
4k views

Using NSPredicate with NSFetchRequest in a NSFetchedResultsController

I am learning CoreData and I wanted to have my code reviewed. As usual, I get something to work, then I attempt to refine it. I have a data model that consists of an Item entity and a subItem entity. ...
5
votes
1answer
202 views

Store CMTimeRange into Core Data

I wanted to store CMTimeRange structures inside managed objects, so I've worked out the following: ...
2
votes
1answer
3k views

Updating UITableView rows from Core Data

I am fetching or querying all the entries from my database (core-data) at three different times in my code, which I find to be an inefficient approach to writing the code. The method ...
3
votes
3answers
3k views

Speeding up storage of about 220000 values in Core Data

I use this code on the app's first run to save about 220000 values into core data. The file Navaids.txt has about 200000 and Waypoints.txt has about 20000 lines, where I get data from each line and ...
5
votes
1answer
305 views

Core Data model for test-taking iOS app

I'm building an iOS app for test-taking and I want to be sure of my model before proceeding. I found this post very helpful and tried to implement a simplified version for Core Data. Here are some ...
3
votes
2answers
1k views

NSManagedObject in need of smart setters

I'm just beginning my foray into iOS development and need a code review. I have a custom NSManagedObject that needs some smart setters. I'm new to Objective-C, ...
2
votes
1answer
771 views

Core Data model of video and entities

I have a Core Data model with two entities: Video and Playlist. A Video can be a member of ...