I’m creating an app that uses pictures from the camera.
I ask the user to take a picture then save it in my document folder. It appears that it is not deleted when the program exits.
How and where is this best done (appdelegate perhaps)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to get the files deleted when application exit, I would recommend you to use the /tmp directory instead. Read the documentation of File System.
Also if you just want to delete the files in documents directory, do it from applicationWillTerminate as follows: