Copying Files to iPhone System Folders?

Discussion in 'iOS Programming' started by raziiq, Jan 28, 2010.

  1. raziiq macrumors member

    Joined:
    Aug 26, 2008
    #1
    Hi there.
    I am developing for Jailbroken iPhone. I need to write(copy) a file to iPhone System Folders (/Library/LaunchDaemons) to which only ROOT has write access. How can i write a file to such folders through my Code. I know i can use NSFileManager's copyItemAtPath:toPath method to copy the file, but i cant write as i dont have permission to write on such folders.

    Any Suggestions??
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    I haven't developed for JB iPhones but the way to do this is probably how its done on MacOS X. Look up suid and MacOS X or cocoa. There is a security framework on the Mac that gives an app the ability to access root-owned resources. Don't remember what it's called but there are lots of examples of how to use it.
     

Share This Page