How to save the image in the file system of the iPhone device, so that later, if I want, I can get it and use it in my application?

I am trying to save an image to a device through my program. I can save the image in the sandbox. After exiting the application, when I started it again, the sandbox address will change, so I can’t download it and use it in the next run.
Please, help.

+3
source share
1 answer

Take a look at this stackoverflow question .

To get the path to your own path to your applications, do

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, 
                                                     NSUserDomainMask, 
                                                     YES); 
NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder

, iPhone, .

iPhone OS - -. . .

+4

Source: https://habr.com/ru/post/1731984/


All Articles