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.
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
sorry for wasting everyones time