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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:57:25+00:00 2026-05-17T19:57:25+00:00

I am not that familiar with core data so im wondering if its possible

  • 0

I am not that familiar with core data so im wondering if its possible to load different pre-populated sqlite db’s into core data and how the performance would be?

I have a client who is storing their data in multiple sqlite db’s on a remote server. Each sqlite db would basically represent a group in the app and there could be anywhere from 10-100 different groups each with their own small sqlite db. All the db’s have the same schema and table structure, could be updated remotely and only one db would be used at a time.

Is it possible or even advisable to use core data in this instance? I could either:

  1. Download the sqlite db from a remote server and then load each db as needed accessing the db directly using sql or,
  2. Download the sqlite db and use core data to load each db and work with it that way? Although from what i have read core data using a bunch of proprietary tables, etc to track the db so it isn possible to just swap in different db’s even though they have the same schema?

Any ideas?
thx

  • 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-17T19:57:26+00:00Added an answer on May 17, 2026 at 7:57 pm

    Yes, I do this right now. I can give you more examples if needed but here’s what I do:

    1. Create the database via sqlite3 on the Mac.
    2. Place the database in the App’s bundle
    3. On app launch, if the database is not in the app’s Documents folder, copy it from the bundle to there
    4. Use the database from the App’s bundle.

    Alternatively, you could download from the web instead of doing steps 2 and 3 – but I’d only do this if it was very large, and would have the disadvtantage of maybe not being immediately available when the app loads.

    Inside applicationDidFinishLaunching:

    NSFileManager *fm = [[NSFileManager alloc] init];
    NSArray *paths = NSSearchPathForDirectoriesInDomains( NSDocumentDirectory, NSUserDomainMask, YES); 
    NSString *documentsDirectory = [paths objectAtIndex:0]; 
    NSString *mapPath = [documentsDirectory stringByAppendingPathComponent:  @"datafile.sqlite" ];      
    if (![fm fileExistsAtPath:mapPath]) {
        // Does Not Exist!!
        NSString *filePath = [[NSBundle mainBundle] pathForResource:@"datafile" ofType:@"sqlite" inDirectory:@"datafiles"];  
        NSData *myData = [NSData dataWithContentsOfFile:filePath]; 
        if (myData)
            [fm createFileAtPath:mapPath contents:myData attributes:nil];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm familiar with Core Data basics and have done some dabbling, but have not
I'm not that familiar with PHP so far but already succeeded in registring a
Let me state off the bat that I'm not that familiar with ASP.Net MVC,
I'm new to java and I'm not that familiar with the formatting rules used
I'm not all that familiar with jquery so I'm not quite sure how to
I'm not all that familiar with markup. I tried to use it to test
I am still not so familiar with interfaces in Java. I know that interface
I'm using a new no-name framework that I'm not completely familiar with and I'm
I've got some syntax in a project I'm working on that I'm not familiar
Ok, so I completely scratched that direction. I'm just not familiar enough with servlet

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.