Hows to write data into file in /var/mobile/Documents [iPhone programming with SDK]

Discussion in 'iOS Programming' started by ilovevnn, Dec 3, 2008.

  1. ilovevnn macrumors newbie

    Dec 3, 2008
    Dear All,

    We are using iPhone 2.5G Firmware 2.1 Jailbreak with Apple SDK for 2.1.

    I have issues with writing data (array of byetes) into file under /var/mobile/Documents. For example:

    NSData* data;
    BOOL ret = [data writeFile:mad:"/var/mobile/Documents/song.mp3"];

    => return error. => Cannot create a song file.

    Would you please help me if you have indeas?
    Thank you

Share This Page