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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T12:02:20+00:00 2026-05-21T12:02:20+00:00

I have got my app to call, the required functions to import my data

  • 0

I have got my app to call, the required functions to import my data back in from an email, but I am not sure of the next step. The app gets passed a url but i am un sure as to how i actually going to download that URL into my apps document directory. I am trying to download a.sqlite file. Thank you.

EDIT:Ok, basicly i am having trouble getting my data.sqlite file from my email account back into my app. At the moment, i can select open with my app and that works, i can see the URL of the file but i am unsure how i get the file from that URL into the documents folder of my app so i can do something with it. i have been trying to use

NSString *Newpath = [[NSString alloc] initWithFormat:@"%@/new.sqlite",documentPath];
NSData *backup = [NSData dataWithContentsOfURL:url];
[backup writeToFile:Newpath atomically:YES];

where url is the url passed in as run time. Hope that clears thins up a bit. Thanks for any help you can offer.

  • 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-21T12:02:21+00:00Added an answer on May 21, 2026 at 12:02 pm

    Ok, i feal stupid now, i have had this working fine for the last hour but have been looking in the wrong directory on my mac so i couldnt see the new files being created. To anyone else with this issue, i solved it with this

    NSString* documentPath =[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 
    
    NSString *Newpath = [[NSString alloc] initWithFormat:@"%@/backup.sqlite",documentPath];
    
    NSData *backup = [NSData dataWithContentsOfURL:url]; 
    [backup writeToFile:Newpath atomically:YES]; 
    

    sorry for wasting everyones time

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

Sidebar

Related Questions

i try to run my app, but i have got an exception thrown, in
We have an app with an extensive admin section. We got a little trigger
I've got a VB.NET WinForms app in which I have the need to refer
I have got a C function in a static library, let's call it A,
I have got the following code from here to read an Excel file using
I got to work on PHP app which requires a webservice call to an
I have got a new problem with my Android app. The SocketChannel tells me
So I've used code examples from all over the net and got my app
I have not done any web dev before. I got my Apache server running
We have got a custom MembershipProvider in ASP.NET . Now there are 2 possible

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.