Hi all,
I'm using following code to save the downloaded file to iphone/ipod-touch's documents directory.
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
[receivedData writeToFile:basePath atomically:YES];
The file downloaded can be of any type which can be opened using Neooffice. The file is getting downloaded as I'm able to see a success message in console which is in connectionDidFinishLoading method along with the number of bytes received, but not getting saved at the given path.
EDIT:
It seems to be getting saved but in the form of .sqlite file which when opened is found empty. Don't know how to address this issue.
Can anybody please help?
Thanx in advance.