<p>I am thinking about the design of an iPhone app I'd like to create.  One possible problem is that this application will have to run as root (to access certain network ports).  In a typical UNIX app, I'd just get the app to run with setuid, but I'm wondering if that is possible with an iPhone app.</p>

<p>I've read this question in Apple's forum, which is discouraging:</p>

<p><a href="http://discussions.apple.com/thread.jspa?threadID=1664575" rel="nofollow noreferrer">http://discussions.apple.com/thread.jspa?threadID=1664575</a></p>

<p>I understand that Apple wants to limit what a program can do, but there are plenty of good, legitimate reasons for a user to run a program with elevated privileges.  I'm not trying to create a hacker tool here.</p>

<p>I'm sure I could get around this on a jail-broken iPhone, but that's not what I'm after.  Is there any way to run an app with elevated privileges on an unbroken iPhone?</p>

<p>(BTW, there is no need to warn me about the NDA.)</p>

Section 3.3.4 of the iPhone SDK Agreement suggests that you mustn't work outside your sandbox.
Given that
Apple has been somewhat arbitrary on which applications they permit
, you should definitely double-check with them
before
you start developing.
Compared to 2.0.x,
the sandbox restrictions have actually increased in 2.1
; you can no longer even read from another application's sandbox. So, even if it currently
is
possible to elevate your app's privileges, it very likely won't be in a future release.