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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:47:47+00:00 2026-05-28T16:47:47+00:00

My App has a database file in its NSBundle. I want to get update

  • 0

My App has a database file in its NSBundle. I want to get update database file from internet whenever new database file is available. and this should happen before app displays data from the database file.
Here is the logic i am trying to use. i don’t know if it makes sense or is there a better way to do it. an example will be awesome

if (file is available in the Documents Directory)
{
    if( check if internet is available )
    {
        1. get file from network
        2. store it in Documents Directory
        if ( compare contents of the old & new file)
        {
            delete downloaded file
        } else {
            move or delete old file & rename new file ( so that the new file's data can be accessed )
        }
    } else {
        use old file in Documents Directory
    }
} else {
    copy file from bundle to Documents Directory
}
  • 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-05-28T16:47:48+00:00Added an answer on May 28, 2026 at 4:47 pm

    Ideally you should have a timestamp or version number for the copy of the DB you have on the phone, and transmit that to the server. Then have the server only send a new copy if there is a newer version. Saves the user a lot of data charges.

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

Sidebar

Related Questions

I have a web application running on Windows IIS. This app has a database
I'm about to build an app that has a database of places that has
The app my colleagues and I maintain has an Oracle database at the back-end.
The app I'm working on has a self contained database. The only time I
My app has many controls on its surface, and more are added dynamically at
We are building a multiuser app that has one database per customer. All customer
I'm trying to update a legacy app that does all its data storage in
I need to make a backup system for my rails app but this has
My app has a DataGridView object and a List of type MousePos. MousePos is
My app has several buttons which trigger different events. The user should NOT be

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.