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 have created an app, that fetchs data from mysql using php. But when
I have a database connection that I got like this: db = Mongo::Connection.new.db(app-development) but
I have got Eclipse to generate a Basic android Hello World app, But it
I have make an app that can show missed call when screen is locked,but
I have got Sinatra/Rails app and an action which starts some long process. Ordinary
I have got a demo script that lets me authorize with my app and
I have got a question. In my app I've got a settings screen and
I have an app that requires user to register. I've got the app conected
I've got an app with three spinners, they have unique IDs and I'm trying
Recently i have submitted an to app hub, App got Certified and got a

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.