O'Reilly logo

iOS Forensics Cookbook by Mayank Birani, Bhanu Birani

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Saving data using the RAW file

In the previous section, you learned about the Document directories. Now, in this section we will explore this in more detail. You will learn about saving RAW files in our application's document directory.

Getting ready

We will use the preceding project for this section as well. So, open the project and follow the next section.

How to do it...

Perform the following steps to write data into your Documents directory:

  1. Now, we will create a .txt file in our folder (which we created in the document directory). Customize the code in viewDidLoad: as follows:
    dataPath = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject] stringByAppendingPathComponent:@"myfile.txt"]; NSLog(@"%@", dataPath); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required