Hi I have my iPhone app which will be run on a jailbroken iPhone and I want to download a file from the web and place it in another apps directory.
I am new to iOS development and have successfully downloaded the file and placed it in the Documents folder but how do I search for the UID of the app and place it in the library folder of another app? Keeping in mind this is on JB iPhone and have access to the filesystem.
Here is what I have so far.
NSString *stringURL = @"http://testfile.plist";
NSURL *url = [NSURL URLWithString:stringURL];
NSData *urlData = [NSData dataWithContentsOfURL:url];
if ( urlData )
{
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *filePath = [NSString stringWithFormat:@"%@%@", documentsDirectory,@"/testfile.plist"];
[urlData writeToFile:filePath atomically:YES];
Thanks