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 7911651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:19:40+00:00 2026-06-03T13:19:40+00:00

I am having difficulty deciding which is the best method for saving my app

  • 0

I am having difficulty deciding which is the best method for saving my app data.

It is a recipe app.

I have an array of category class objects that contains an NSString variable for the category title and an NSMutable Array of Recipe class objects (which contains 3 NSString variables).

here is a semi-visual representation of my app model:

Array of Categories contains:

  • Category Object 1–>contains string title and mutable array of Recipe Objects
  • Category Object 2–>contains string title and mutable array of Recipe Objects

…

etc.

Users are able to create new recipes and the recipe object is stored within a selected category object.

On app load x amount of categories are created (depending on value of a numberOfCategories int). and of course upon relaunch I want to restore the recipes to their appropriate category objects.

Hopefully that wasn’t too confusing–I was going the NSUserDefaults way and doing the NSCoding thing to encode/decode my custom objects but found it confusing because I have an array of custom objects that contains an array of custom objects.

I am open to the idea if it is the best route of converting my project to use Core Data–but that also seemed overly complicated for the simplicity of my app (pre-populating my SQLite database with categories, etc etc).

Let me know if you need further clarification.

  • 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-03T13:19:41+00:00Added an answer on June 3, 2026 at 1:19 pm

    Use CoreData. Sounds like you will need at least two separate entities and establish a relationship between them (Recipe and RecipeObject). NSUserdefaults is great for storing small amounts of data that needs to be persisted, but not really good for your use case.

    Also, check out MagicalRecord and MOGenerator. Both of these open source libraries make working with CD much more fun and productive.

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

Sidebar

Related Questions

I'm having difficulty translating sql to linq syntax. I have 2 tables (Category and
When creating an object without class parameters, I am having difficulty deciding whether I
I'm having difficulty with pages that does not show the updated data immediately Here's
I'm having difficulty replacing the text of a link with new text. I have
I am planning a dynamic PHP photo gallery and having difficulty deciding on the
Having difficulty checking (checkbox) all nodes by a specific class here is what i
Having difficulty making my javascript act the way I want. I have a button,
Having difficulty articulating this correlated subquery. I have two tables fictitious tables, foo and
Having difficulty finding relevant search results... Given this model: public abstract class A {
I'm having difficulty parsing some JSON data returned from my server using jQuery.ajax() To

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.