Reputation: 1939
It is the first time that I have tested my app on an iPad outside of the simulator. I have some files whose path is retrieved using:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
When running in the simulator everything is ok, but on the iPad it seems that the files in the document directory are not uploaded. How can I upload all of these files to the iPad?
Upvotes: 0
Views: 120
Reputation: 132
iOS devices follow sandbox environment, so every app have its own Documents folder. To save files in the documents folder, you can try the following:
//This will provide you path for the document folder of your app.
NSString *documentsPath = [NSHomeDirectory stringByAppendingPathComponent:@"Documents"];
Now, you can use this path to append path of your files and save your files.
Please let me know if any query.
Upvotes: 1