Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8589329
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T23:01:43+00:00 2026-06-11T23:01:43+00:00

I am having trouble grasping what the best implementation of this functionality. My end

  • 0

I am having trouble grasping what the best implementation of this functionality. My end goal is to take stats from a note document such as word count and line count by session (session being one instance of opening the document and editing it then closing it). Then take that data and graph it over time. I can’t find anything related to using core data this way. I’m using a NSFetchedResultsController in line with the awesome iOS lectures posted by Stanford.

This could simply be a huge misinterpretation of core data on my part. Would it be easier to save each session data as NSString attributes in a similar format to “timestamp – wordCount” and “timestamp – lineCount” for later parsing?

I have an app which has a text documnt lets call them “notes” entities. Each note entity has a “stats” entity associated with it in a one-to-one relationship. The notes entities keep individual total wordCount and lineCount attributes while the stats entity keeps data attributes in data sets in the NSString format mentioned above.

The reasoning is that I want to be able to launch the notes objects on start without having to load a ton of data on app launch.

Is this the best way to keep this sort of data? Just seems kind of jenky to me for a lack of better words. I read the apple documentation on Core Data, watched some tutorials including the Stanford lectures and searched this up through Google-fu skills but couldn’t find anything. This is my first time using Core Data so I believe I’m just having a hard time actually applying what I’ve learned.

If I missed anything please feel free to call me out as I was writing this while walking. Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T23:01:44+00:00Added an answer on June 11, 2026 at 11:01 pm

    Attempting to capture a couple embedded questions:

    Would it be easier to save each session data as NSString attributes in a similar format to “timestamp – wordCount” and “timestamp – lineCount” for later parsing?

    Easier, possibly? But NSString is not a good way of storing elemental data.

    Is this the best way to keep this sort of data?

    You’re referring to packing metadata about the documents into an NSString; I’m sure it would work – but probably better to encapsulate the metadata in a class of its own – or alternatively as you suggested Core Data.

    My suggestion is the former; that is, I would take the data that you are packing into a NSString and make a class out of it. The Apple documentation outright states that Core Data is not an entry-level technology. It’s often a good solution for the implementation of your model layer; but not always. In your case, you could do something as simple as:

    @interface NoteMetadata:NSObject
    
    @property (nonatomic, assign) NSInteger wordCount;
    @property (nonatomic, assign) NSInteger lineCount;
    @property (nonatomic, strong) NSDate *timeStamp;
    
    @end
    

    etc., then perhaps your Note object could have an array of these NoteMetadata objects that comprise the sessions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Having trouble grasping this: [AcceptVerbs(HttpVerbs.Post)] public ActionResult Edit(Movie movieToEdit) { var originalMovie = (from
I'm having a little trouble grasping CoreData relationships, i'm note sure which relationship type
I'm having trouble grasping how to do this. I have a polygon defined by
To start off, this really isn't CodeIgniter specific. I'm having trouble grasping an idea,
Having trouble inheriting from a template class. Looks something like this: template<typename type> class
It's a duplicate of this question. I was having trouble grasping some Cocoa fundementals
I'm having trouble grasping generic methods. I have two classes that are generated (they
Having trouble framing this assertion in Rspec for my rails app. A User has
I am having trouble grasping the concept of multi component uipickerviews. I really would
There are only 3 lines of code, and yet I'm having trouble fully grasping

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.