I have a an app in both Android and iOS, the app is supposed to download and save some files on the device with a click of a button. I manage the directories in Android, and I specify the url of the file with this :
Environment.getExternalStorageDirectory().getPath() + "/appDirectory/" + fileName
I wanted to ask what is similar way to specify this in Objective c and iOS.
Right now I use this in objective-c:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentationDirectory,NSUserDomainMask,YES);
NSString *documentDirectory = [paths objectAtIndex:0];
NSString *filePath = [NSString stringWithFormat:@"%@%@", documentDirectory, @"/myfile.mp4"];
filePath will return something like this:
/var/mobile/Applications/CFEDE74F0A493-499B/Library/Documentation/myfile.mp4
is this the right way?
Thanks very much