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

  • Home
  • SEARCH
  • 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 9026487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:31:51+00:00 2026-06-16T06:31:51+00:00

I am trying to download an sqlite database from my Dropbox using a direct

  • 0

I am trying to download an sqlite database from my Dropbox using a direct link as the source path, and then saving it to the app’s document file. It’s just a means of updating the database without having to update the app.

When I check if the file exists before downloading, the file is not visible.

NSFileManager *fileManager = [NSFileManager defaultManager];

NSString *sourceDBPath = @"https://www.dropbox.com/s/868vvg7uremst9n/Data.sqlite?dl=1";

if ([fileManager fileExistsAtPath:sourceDBPath])
{

NSData *dbFile = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"https://www.dropbox.com/s/868vvg7uremst9n/Data.sqlite?dl=1"]];

NSString *resourceDocPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle]  resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]];

NSString *filePath = [resourceDocPath stringByAppendingPathComponent:@"Database.sqlite"];


[dbFile writeToFile:filePath atomically:YES];
}

Would I need to integrate the Dropbox SDK into my app even if I am using a direct link to the file?

  • 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-16T06:31:53+00:00Added an answer on June 16, 2026 at 6:31 am

    Well, the link is definitely working, and no, you don’t need to link up Dropbox and your app for this to work.

    There are some issues with https and ios detailed here:

    iOS 5’s TLS implementation has been upgraded to support TLS protocol version 1.2. Some non-compliant TLS server implementations do not implement TLS 1.2 and, more importantly, do not downgrade gracefully to a supported protocol version. As a result you may find that some TLS client applications built against the iOS 5 SDK may not connect to some TLS servers, when the same application built against a previous version of the iOS SDK would connect.

    Excerpted from…

    Update.

    However, I just tried to retrieve it using the following code:

    NSString *dropboxHttpsUrl = @"https://www.dropbox.com/s/868vvg7uremst9n/Data.sqlite?dl=1";
    NSData *dbFile = [[NSData alloc] initWithContentsOfURL:
                          [NSURL URLWithString:dropboxHttpsUrl]];
    
    if(dbFile) {
       NSLog(@"%i", [dbFile length]);
       NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
       NSString *documentsDirectory = [paths objectAtIndex:0];
       NSString *appFile = [documentsDirectory stringByAppendingPathComponent:@"test.db"];
       [dbFile writeToFile:appFile atomically:YES];
       NSLog(@"%@", appFile);
    }else{
       NSLog(@"nothing got retrieved");
    }
    

    And I was able to grab the database and see the empty Example table and schema.

    Just build you document path in a more standard fashion:

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *appFile = [documentsDirectory stringByAppendingPathComponent:@"test.db"];
    

    Don’t do:

    NSString *resourceDocPath = [[NSString alloc] initWithString:[[[[NSBundle mainBundle]  resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]];
    

    It’s this that’s probably saving it to the wrong place, or worse not at all.

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

Sidebar

Related Questions

I'm trying to build System.Data.SQLite in Visual Studio using the source code downloaded from
I am trying to download the file from the document using sharepoint webservices called
I am trying to download database (SQLite) which has to be used in app.
Im trying to download share data from a stock exchange using python. The problem
I am trying to download a file from a website using python and mechanize.
I`am trying to download and install an apk from some link, but for some
Trying to download docs from the Google Docs using Java client library and getting
I'm trying to download my data from App Engine. As suggested here , I'm
I'm trying to download images from specific MediaWiki pages (Or just specific images) using
i'm trying to download file from http server using WinINet library calls. It works

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.