Phoenix Kyaw
Phoenix Kyaw

Reputation: 432

How to convert NSData object to file ouput

In my iPhone project,I need to convert NSData object to file.I have to convert NSData to file and save on project's resources folder and need to use it.How to save NSData as files and how to reference them on my project as resources?

Upvotes: 0

Views: 2407

Answers (1)

TheEye
TheEye

Reputation: 9346

NSData has a function you can call to write it to a file:

[nsDataObject writeToFile:path atomically:YES];

where path is the path and filename you want to write it to.

Upvotes: 1

Related Questions