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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:37:02+00:00 2026-06-08T09:37:02+00:00

I am working on a mobile app which needs a lot of data. Simply

  • 0

I am working on a mobile app which needs a lot of data. Simply put, the data will be for multiple languages and consist of all the words possible for that language. The app would start with only the English language and a lot of it’s words. Then the user can choose to download more languages and their data.

I am trying to figure out the best way to read/save/update this data. Should I create a plist file with English data to start with and just keep adding more data as user downloads new languages? Or should I save all the data in nsuserdefaults? Or, should I just include a text file with all the data and parse it on the fly?

Suggestions?

ps: i understand that as this is a mobile app, file space and parsing time have to be considered

  • 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-08T09:37:03+00:00Added an answer on June 8, 2026 at 9:37 am

    Please read my answer here: https://stackoverflow.com/a/7215501/832065

    As said in that answer, all NSUserDefaults are stored together in one plist.

    A plist and NSUserDefaults are basically the same, however NSUserDefaults should ONLY be used for saving preferences and not a big amount of data. So don’t use NSUserDefaults!

    I would consider saving this in a plist (NSDictionary). Like this you can have all data sorted in that file. Simply set the “words” (NSString I assume) as object, and the language as key.

    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];
    [dict setObject:words forKey:language];
    [dict writeToFile:filePath atomically:YES];
    

    same for reading:

    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:filePath];
    NSString *words = [dict objectForKey:language];
    

    EDIT:

    If each word is assigned to a number (you can just use NSArray) it doesn’t differ much:

    NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithContentsOfFile:filePath];
    NSArray *words = [NSArray arrayWithObjects:allTheWords,nil];
    [dict setObject:words forKey:language];
    [dict writeToFile:filePath atomically:YES];
    

    same for reading:

    NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:filePath];
    NSArray *words = [dict objectForKey:language];
    NSString *word = [words objectAtIndex:numberAssignedToWord];
    

    I hope this helps! 🙂

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

Sidebar

Related Questions

I'm working on a mobile app with Phonegap which will use Geolocation. I used
I'm working on a web app, which I decided to use jQuery Mobile for
I'm working on a mobile website which is NOT a native iPhone app but
I'm working on a bug in a legacy Windows Mobile 5 app, which uses
I am working on a EDIT: mobile web app which displays some sensitive information
I'm working on a mobile web app that needs to work in IE Mobile.
I'm working on a mobile website (it's not a single page app) which has
I'm working on a WP7 app which gets and updates data on a web
I am working for mobile app. I am showing popup with content, If content
I am currently working on a mobile app that is going to communicate with

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.