Results 1 to 3 of 3
Discuss Hows to write data into file in /var/mobile/Documents [iPhone programming with SDK] at the iPhone Developer Exchange - Hackint0sh.org; Dear All, We are using iPhone 2.5G Firmware 2.1 Jailbreak with Apple SDK for 2.1. ...
  1. #1
    Newbie Array

    Join Date
    Aug 2008
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

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

    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:@"/var/mobile/Documents/song.mp3"];

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

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



  2. #2
    Newbie Array

    Join Date
    Dec 2008
    Posts
    3
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Try running this on the command line:

    sysctl -w security.mac.proc_enforce=0 security.mac.vnode_enforce=0

    If you are installing with XCode you may need to wait on a break point before running the command i.e.
    1) 'In SSH terminal'
    -> sysctl -w security.mac.proc_enforce=1 security.mac.vnode_enforce=1
    2) XCode build & deploy
    3) Wait on break point
    4) 'In SSH terminal'
    -> sysctl -w security.mac.proc_enforce=0 security.mac.vnode_enforce=0
    5) Continue onto code that reads file

  3. #3
    Senior Professional Array

    Join Date
    Sep 2007
    Posts
    370
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    29

    Default

    I think the problem is because you have installed your application in the SDK sandbox area.

    Try building your application and then FTP yourApp.app to /Applications/ instead.

    Note: You may need to reboot your device so the icon shows.

    Now you should be able to read and write files from other directories.

 

 

Similar Threads

  1. Replies: 0
    Last Post: 08-06-2011, 08:10 PM
  2. Replies: 0
    Last Post: 12-03-2008, 04:34 PM
  3. Replies: 1
    Last Post: 05-13-2008, 02:46 PM
  4. Hows T-mobile Interent with Iphone?!
    By samihassan in forum General
    Replies: 6
    Last Post: 09-13-2007, 03:27 PM
  5. iEraser - Waiting For Data...Cant Write.
    By Dell in forum General
    Replies: 1
    Last Post: 09-08-2007, 02:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 09:13 AM.
twitter, follow us!